Class: Tabs::DropdownTab::Component
- Inherits:
-
Lookbook::BaseComponent
- Object
- Lookbook::BaseComponent
- Tabs::DropdownTab::Component
- Defined in:
- app/components/lookbook/tabs/dropdown_tab/component.rb
Instance Method Summary collapse
-
#initialize(name:, label: nil, hotkey: nil, disabled: nil, position: 0, theme: :toolbar, **html_attrs) ⇒ Component
constructor
A new instance of Component.
- #label ⇒ Object
Constructor Details
#initialize(name:, label: nil, hotkey: nil, disabled: nil, position: 0, theme: :toolbar, **html_attrs) ⇒ Component
Returns a new instance of Component.
3 4 5 6 7 8 9 10 11 |
# File 'app/components/lookbook/tabs/dropdown_tab/component.rb', line 3 def initialize(name:, label: nil, hotkey: nil, disabled: nil, position: 0, theme: :toolbar, **html_attrs) @name = name @label = label @hotkey = hotkey @disabled = disabled @position = position @theme = theme super(**html_attrs) end |
Instance Method Details
#label ⇒ Object
13 14 15 |
# File 'app/components/lookbook/tabs/dropdown_tab/component.rb', line 13 def label @label.presence || content || @name.titleize end |