Class: Pajamas::CheckboxTagComponent

Inherits:
Component
  • Object
show all
Includes:
Pajamas::Concerns::CheckboxRadioLabelWithHelpText, Pajamas::Concerns::CheckboxRadioOptions
Defined in:
app/components/pajamas/checkbox_tag_component.rb

Instance Method Summary collapse

Methods included from Pajamas::Concerns::CheckboxRadioOptions

#formatted_input_options

Methods included from Pajamas::Concerns::CheckboxRadioLabelWithHelpText

#render_label_tag_with_help_text, #render_label_with_help_text

Constructor Details

#initialize(name:, label_options: {}, checkbox_options: {}, value: '1', checked: false) ⇒ CheckboxTagComponent

Returns a new instance of CheckboxTagComponent.



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/components/pajamas/checkbox_tag_component.rb', line 12

def initialize(
  name:,
  label_options: {},
  checkbox_options: {},
  value: '1',
  checked: false
)
  @name = name
  @label_options = label_options
  @input_options = checkbox_options
  @value = value
  @checked = checked
end