Class: Spark::Input::Checkbox

Inherits:
Base show all
Defined in:
app/components/spark/input/checkbox.rb

Direct Known Subclasses

Switch

Instance Method Summary collapse

Methods inherited from Component::Base

#selector, #to_s, #unique_id

Constructor Details

#initializeCheckbox

Returns a new instance of Checkbox.



6
7
8
9
10
11
# File 'app/components/spark/input/checkbox.rb', line 6

def initialize(*)
  super

  tag_attrs.add attr_hash(:checked)
  tag_attrs.add type: :checkbox
end