Class: Blacklight::Icons::IconComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Blacklight::Icons::IconComponent
- Defined in:
- app/components/blacklight/icons/icon_component.rb
Overview
This is the list icon for the search button. You can override the default svg by setting:
Blacklight::Icons::ListComponent.svg = '<svg>your SVG here</svg>'
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(svg: nil) ⇒ IconComponent
constructor
A new instance of IconComponent.
Constructor Details
#initialize(svg: nil) ⇒ IconComponent
Returns a new instance of IconComponent.
9 10 11 |
# File 'app/components/blacklight/icons/icon_component.rb', line 9 def initialize(svg: nil) self.svg = svg if svg end |
Instance Method Details
#call ⇒ Object
13 14 15 |
# File 'app/components/blacklight/icons/icon_component.rb', line 13 def call svg&.html_safe # rubocop:disable Rails/OutputSafety end |