Class: DaisyUI::Swap
- Inherits:
-
Base
- Object
- Phlex::HTML
- Base
- DaisyUI::Swap
show all
- Defined in:
- lib/daisy_ui/swap.rb
Constant Summary
Constants inherited
from Base
Base::BOOLS, Base::COLOR_MODIFIERS
Instance Method Summary
collapse
Methods inherited from Base
inherited, register_modifiers
Constructor Details
#initialize(as: :label) ⇒ Swap
Returns a new instance of Swap.
8
9
10
|
# File 'lib/daisy_ui/swap.rb', line 8
def initialize(*, as: :label, **)
super
end
|
Instance Method Details
#indeterminate(**options) ⇒ Object
24
25
26
|
# File 'lib/daisy_ui/swap.rb', line 24
def indeterminate(**options, &)
div(class: component_classes("swap-indeterminate", options:), **options, &)
end
|
#off(**options) ⇒ Object
20
21
22
|
# File 'lib/daisy_ui/swap.rb', line 20
def off(**options, &)
div(class: component_classes("swap-off", options:), **options, &)
end
|
#on(**options) ⇒ Object
16
17
18
|
# File 'lib/daisy_ui/swap.rb', line 16
def on(**options, &)
div(class: component_classes("swap-on", options:), **options, &)
end
|
#view_template ⇒ Object
12
13
14
|
# File 'lib/daisy_ui/swap.rb', line 12
def view_template(&)
public_send(as, class: classes, **attributes, &)
end
|