Class: Blacklight::SkipLinkItemComponent
- Defined in:
- app/components/blacklight/skip_link_item_component.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(text:, href:) ⇒ SkipLinkItemComponent
constructor
A new instance of SkipLinkItemComponent.
- #link_classes ⇒ Object
Methods inherited from Component
reset_compiler!, sidecar_files, upstream_sidecar_files
Constructor Details
#initialize(text:, href:) ⇒ SkipLinkItemComponent
Returns a new instance of SkipLinkItemComponent.
5 6 7 8 |
# File 'app/components/blacklight/skip_link_item_component.rb', line 5 def initialize(text:, href:) @text = text @href = href end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'app/components/blacklight/skip_link_item_component.rb', line 10 def call link_to @text, @href, class: link_classes end |
#link_classes ⇒ Object
14 15 16 |
# File 'app/components/blacklight/skip_link_item_component.rb', line 14 def link_classes 'd-inline-flex py-2 px-3' end |