Class: DaisyUI::Label
Overview
Label component for wrapping inputs, selects, or creating floating labels
Constant Summary
Constants inherited from Base
Base::BOOLS, Base::COLOR_MODIFIERS
Instance Method Summary collapse
-
#text(content = nil, **options) ⇒ Object
Renders label text for input/select wrappers For floating labels, use a plain span instead.
- #view_template ⇒ Object
Methods inherited from Base
inherited, #initialize, register_modifiers
Constructor Details
This class inherits a constructor from DaisyUI::Base
Instance Method Details
#text(content = nil, **options) ⇒ Object
Renders label text for input/select wrappers For floating labels, use a plain span instead
66 67 68 69 70 |
# File 'lib/daisy_ui/label.rb', line 66 def text(content = nil, **) span(class: component_classes("label", options:), **) do content || yield end end |
#view_template ⇒ Object
55 56 57 |
# File 'lib/daisy_ui/label.rb', line 55 def view_template(&) label(class: classes, **attributes, &) end |