Class: Blacklight::SearchButtonComponent
- Defined in:
- app/components/blacklight/search_button_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(text:, id:) ⇒ SearchButtonComponent
constructor
A new instance of SearchButtonComponent.
Methods inherited from Component
reset_compiler!, sidecar_files, upstream_sidecar_files
Constructor Details
#initialize(text:, id:) ⇒ SearchButtonComponent
Returns a new instance of SearchButtonComponent.
5 6 7 8 |
# File 'app/components/blacklight/search_button_component.rb', line 5 def initialize(text:, id:) @text = text @id = id end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 |
# File 'app/components/blacklight/search_button_component.rb', line 10 def call tag.(class: 'btn btn-primary search-btn', type: 'submit', id: @id) do tag.span(@text, class: "visually-hidden-sm me-sm-1 submit-search-text") + render(Blacklight::Icons::SearchComponent.new) end end |