Class: Keystone::Ui::SettingsLinkComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Keystone::Ui::SettingsLinkComponent
- Defined in:
- app/components/keystone/ui/settings_link_component.rb
Constant Summary collapse
- LINK_CLASSES =
"flex items-center justify-between px-4 py-3 text-gray-900 dark:text-gray-100 no-underline hover:bg-gray-50 dark:hover:bg-gray-800"- CHEVRON_ICON =
<<~SVG.freeze <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-5 text-gray-400"> <path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5" /> </svg> SVG
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Instance Method Summary collapse
-
#initialize(label:, href:) ⇒ SettingsLinkComponent
constructor
A new instance of SettingsLinkComponent.
- #link_classes ⇒ Object
Constructor Details
#initialize(label:, href:) ⇒ SettingsLinkComponent
Returns a new instance of SettingsLinkComponent.
16 17 18 19 |
# File 'app/components/keystone/ui/settings_link_component.rb', line 16 def initialize(label:, href:) @label = label @href = href end |
Instance Attribute Details
#href ⇒ Object (readonly)
Returns the value of attribute href.
6 7 8 |
# File 'app/components/keystone/ui/settings_link_component.rb', line 6 def href @href end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
6 7 8 |
# File 'app/components/keystone/ui/settings_link_component.rb', line 6 def label @label end |
Instance Method Details
#link_classes ⇒ Object
21 22 23 |
# File 'app/components/keystone/ui/settings_link_component.rb', line 21 def link_classes LINK_CLASSES end |