Class: SolidusAdmin::SkipLink::Component
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- SolidusAdmin::SkipLink::Component
- Defined in:
- app/components/solidus_admin/skip_link/component.rb
Overview
Skip to content link
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(href:) ⇒ Component
constructor
A new instance of Component.
Constructor Details
#initialize(href:) ⇒ Component
Returns a new instance of Component.
6 7 8 |
# File 'app/components/solidus_admin/skip_link/component.rb', line 6 def initialize(href:) @href = href end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/components/solidus_admin/skip_link/component.rb', line 10 def call link_to t(".skip_link"), @href, class: %{ sr-only focus:not-sr-only inline-block focus:p-2 focus:absolute body-small text-white bg-black } end |