Class: Primer::Forms::CheckBox
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Primer::Forms::CheckBox
- Defined in:
- lib/primer/forms/check_box.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes included from ActsAsComponent
Instance Method Summary collapse
-
#initialize(input:) ⇒ CheckBox
constructor
A new instance of CheckBox.
Methods inherited from BaseComponent
#content, inherited, #input?, #perform_render, #to_component, #type
Methods included from ActsAsComponent
#compile!, extended, #renders_templates
Methods included from ClassNameHelper
Constructor Details
#initialize(input:) ⇒ CheckBox
Returns a new instance of CheckBox.
9 10 11 12 13 |
# File 'lib/primer/forms/check_box.rb', line 9 def initialize(input:) @input = input @input.add_label_classes("FormControl-label") @input.add_input_classes("FormControl-checkbox") end |