Method: Coco::Button#initialize
- Defined in:
- app/components/coco/base/button/button.rb
#initialize(click: nil, resize: nil, states: nil, loading: false, active: false, button_element: {}, **kwargs) ⇒ Button
Returns a new instance of Button.
79 80 81 82 83 84 85 86 87 88 89 |
# File 'app/components/coco/base/button/button.rb', line 79 def initialize(click: nil, resize: nil, states: nil, loading: false, active: false, button_element: {}, **kwargs) @on_click = click @resize = resize.to_h @states = states.to_h @loading = loading @active = active @alpine_data = {} @button_element_attrs = super(**kwargs) end |