Class: Protos::Swap
- Defined in:
- lib/protos/swap.rb,
lib/protos/swap/on.rb,
lib/protos/swap/off.rb
Defined Under Namespace
Instance Method Summary collapse
- #off ⇒ Object
- #on ⇒ Object
-
#view_template ⇒ Object
DOCS: The swap component is a checkbox that can be toggled on and off to display different content.
Methods inherited from Component
Constructor Details
This class inherits a constructor from Protos::Component
Instance Method Details
#view_template ⇒ Object
DOCS: The swap component is a checkbox that can be toggled on and off to display different content. daisyui.com/components/swap/
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/protos/swap.rb', line 9 def view_template label(**attrs) do input( type: :checkbox, class: css[:input], autocomplete: :off, form: "", aria_label: "swap" ) yield if block_given? end end |