Class: PhlexyUI::Label

Inherits:
Base
  • Object
show all
Defined in:
lib/phlexy_ui/label.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, modifiers

Constructor Details

This class inherits a constructor from PhlexyUI::Base

Instance Method Details

#text(as: :span, **options) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/phlexy_ui/label.rb', line 15

def text(as: :span, **options, &)
  generate_classes!(
    # "label-text"
    component_html_class: :"label-text",
    options:
  ).then do |classes|
    public_send(as, class: classes, **options, &)
  end
end

#view_templateObject



5
6
7
8
9
10
11
12
13
# File 'lib/phlexy_ui/label.rb', line 5

def view_template(&)
  generate_classes!(
    # "label"
    component_html_class: :label,
    options:
  ).then do |classes|
    label(class: classes, **options, &)
  end
end