Welcome to mirror list, hosted at ThFree Co, Russian Federation.

has_icon.rb « sidebars « concerns « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d1a87918285855f43ed437fffe41bf19b5cf5399 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

# This module has the necessary methods to show
# sprites or images next to the menu item.
module Sidebars
  module HasIcon
    def sprite_icon
      nil
    end

    def sprite_icon_html_options
      {}
    end

    def image_path
      nil
    end

    def image_html_options
      {}
    end

    def icon_or_image?
      sprite_icon || image_path
    end
  end
end