Class: PhlexUI::Button
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(variant: :primary, size: :md, icon: false, **attrs) ⇒ Button
constructor
A new instance of Button.
- #view_template ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(variant: :primary, size: :md, icon: false, **attrs) ⇒ Button
Returns a new instance of Button.
5 6 7 8 9 10 |
# File 'lib/phlex_ui/button.rb', line 5 def initialize(variant: :primary, size: :md, icon: false, **attrs) @variant = variant.to_sym @size = size.to_sym @icon = icon super(**attrs) end |
Instance Method Details
#view_template ⇒ Object
12 13 14 |
# File 'lib/phlex_ui/button.rb', line 12 def view_template(&) (**attrs, &) end |