Class: Keystone::Ui::SettingsLinkComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/keystone/ui/settings_link_component.rb

Constant Summary collapse

"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

Instance Method Summary collapse

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

#hrefObject (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

#labelObject (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



21
22
23
# File 'app/components/keystone/ui/settings_link_component.rb', line 21

def link_classes
  LINK_CLASSES
end