Class: Ui::Checkbox::Component

Inherits:
BaseComponent
  • Object
show all
Defined in:
lib/uikit_rails/templates/components/checkbox/component.rb

Overview

Styled checkbox with optional label.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_attrsObject (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

#labelObject (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