Class: Trek::Form::SwitchBoxComponent
- Inherits:
-
ViewComponent::Form::CheckBoxComponent
- Object
- ViewComponent::Form::CheckBoxComponent
- Trek::Form::SwitchBoxComponent
- Includes:
- CssClassesHelpers, StimulusHelpers
- Defined in:
- app/components/trek/form/switch_box_component.rb
Instance Method Summary collapse
Methods included from StimulusHelpers
#stimulus_action, #stimulus_class, #stimulus_class_hash, #stimulus_class_key, #stimulus_target, #stimulus_target_hash, #stimulus_target_key, #stimulus_value, #stimulus_value_hash, #stimulus_value_key
Methods included from CssClassesHelpers
#class_for, #class_names_for, #root_class
Methods included from IdentifierHelper
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 |
# File 'app/components/trek/form/switch_box_component.rb', line 9 def call @conditional_element = .delete(:conditional_element) tag.label(class: root_class, data: data_attributes) do safe_join([checkbox_field, icons, label_text], " ") end end |