Class: Tramway::Form::CheckboxComponent
- Inherits:
-
TailwindComponent
- Object
- ViewComponent::Base
- BaseComponent
- TailwindComponent
- Tramway::Form::CheckboxComponent
- Defined in:
- app/components/tramway/form/checkbox_component.rb
Overview
Tailwind-styled checkbox field
Constant Summary
Constants inherited from TailwindComponent
TailwindComponent::SIZE_CLASSES
Constants included from Helpers::ViewsHelper
Helpers::ViewsHelper::FORM_SIZES
Instance Method Summary collapse
Methods included from Helpers::ViewsHelper
#tramway_back_button, #tramway_badge, #tramway_button, #tramway_cell, #tramway_chat, #tramway_container, #tramway_flash, #tramway_form_for, #tramway_header, #tramway_main_container, #tramway_row, #tramway_table, #tramway_title
Methods included from Helpers::ComponentHelper
Methods included from Helpers::DecorateHelper
Instance Method Details
#label_classes ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/components/tramway/form/checkbox_component.rb', line 7 def label_classes default_classes = 'cursor-pointer mb-0' case size when :small default_classes += ' text-sm' when :medium default_classes += ' text-base' when :large default_classes += ' text-lg' end default_classes end |