Class: Irelia::Dropdown::Component
- Inherits:
-
Component
- Object
- ViewComponentContrib::Base
- Component
- Irelia::Dropdown::Component
- Defined in:
- app/components/irelia/dropdown/component.rb
Defined Under Namespace
Classes: CustomDropdownTrigger, DropdownItem, DropdownTrigger
Instance Method Summary collapse
-
#initialize(**options) ⇒ Component
constructor
A new instance of Component.
- #variants ⇒ Object
Methods inherited from Component
#add_css_classes, after_initialize, #html_options, inherited, run_after_initialize_hooks
Constructor Details
#initialize(**options) ⇒ Component
Returns a new instance of Component.
20 21 22 |
# File 'app/components/irelia/dropdown/component.rb', line 20 def initialize(**) super end |
Instance Method Details
#variants ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/components/irelia/dropdown/component.rb', line 11 def variants class_names( "irelia-dropdown", "irelia-dropdown--default": variant == :default, "irelia-dropdown--direction-down": direction == :down, "irelia-dropdown--direction-up": direction == :up ) end |