Class: Ui::Label::Component
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Ui::Label::Component
- Defined in:
- lib/uikit_rails/templates/components/label/component.rb
Overview
Form label with consistent styling.
Instance Attribute Summary collapse
-
#html_attrs ⇒ Object
readonly
Returns the value of attribute html_attrs.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(**html_attrs) ⇒ Component
constructor
A new instance of Component.
Constructor Details
#initialize(**html_attrs) ⇒ Component
Returns a new instance of Component.
9 10 11 12 |
# File 'lib/uikit_rails/templates/components/label/component.rb', line 9 def initialize(**html_attrs) @html_attrs = html_attrs super() end |
Instance Attribute Details
#html_attrs ⇒ Object (readonly)
Returns the value of attribute html_attrs.
7 8 9 |
# File 'lib/uikit_rails/templates/components/label/component.rb', line 7 def html_attrs @html_attrs end |
Instance Method Details
#call ⇒ Object
14 15 16 |
# File 'lib/uikit_rails/templates/components/label/component.rb', line 14 def call content_tag(:label, content, **computed_attrs) end |