Class: DaisyUI::Steps
- Inherits:
-
Base
- Object
- Phlex::HTML
- Base
- DaisyUI::Steps
show all
- Defined in:
- lib/daisy_ui/steps.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: :ul) ⇒ Steps
Returns a new instance of Steps.
8
9
10
|
# File 'lib/daisy_ui/steps.rb', line 8
def initialize(*, as: :ul, **)
super
end
|
Instance Method Details
#icon(**options) ⇒ Object
23
24
25
|
# File 'lib/daisy_ui/steps.rb', line 23
def icon(**options, &)
div(class: component_classes("step-icon", options:), **options, &)
end
|
#step(*step_modifiers, **options) ⇒ Object
18
19
20
21
|
# File 'lib/daisy_ui/steps.rb', line 18
def step(*step_modifiers, **options, &)
step_classes = build_step_classes(step_modifiers, options)
li(class: step_classes, **options, &)
end
|
#view_template ⇒ Object
12
13
14
15
16
|
# File 'lib/daisy_ui/steps.rb', line 12
def view_template
public_send(as, class: classes, **attributes) do
yield self if block_given?
end
end
|