Class: Ui::Checkbox::Component
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Ui::Checkbox::Component
- Defined in:
- lib/uikit_rails/templates/components/checkbox/component.rb
Overview
Styled checkbox with optional label.
Instance Attribute Summary collapse
-
#html_attrs ⇒ Object
readonly
Returns the value of attribute html_attrs.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Instance Method Summary collapse
-
#initialize(label: nil, **html_attrs) ⇒ Component
constructor
A new instance of Component.
Constructor Details
#initialize(label: nil, **html_attrs) ⇒ Component
Returns a new instance of Component.
9 10 11 12 13 |
# File 'lib/uikit_rails/templates/components/checkbox/component.rb', line 9 def initialize(label: nil, **html_attrs) @label = label @html_attrs = html_attrs super() end |
Instance Attribute Details
#html_attrs ⇒ Object (readonly)
Returns the value of attribute html_attrs.
7 8 9 |
# File 'lib/uikit_rails/templates/components/checkbox/component.rb', line 7 def html_attrs @html_attrs end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
7 8 9 |
# File 'lib/uikit_rails/templates/components/checkbox/component.rb', line 7 def label @label end |