Class: Ui::Label::Component

Inherits:
BaseComponent
  • Object
show all
Defined in:
lib/uikit_rails/templates/components/label/component.rb

Overview

Form label with consistent styling.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_attrsObject (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

#callObject



14
15
16
# File 'lib/uikit_rails/templates/components/label/component.rb', line 14

def call
  (:label, content, **computed_attrs)
end