Class: Railsboot::DropdownComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/railsboot/dropdown_component.rb

Constant Summary

Constants inherited from Component

Component::COLORS, Component::DEFAULT_COLOR

Instance Method Summary collapse

Constructor Details

#initialize(**html_attributes) ⇒ DropdownComponent

Returns a new instance of DropdownComponent.



10
11
12
13
14
15
16
17
# File 'app/components/railsboot/dropdown_component.rb', line 10

def initialize(**html_attributes)
  @html_attributes = html_attributes

  @html_attributes[:class] = class_names(
    "dropdown",
    html_attributes.delete(:class)
  )
end