Module: Lightning::UI::ComponentsHelper
- Defined in:
- app/helpers/lightning/ui/components_helper.rb
Instance Method Summary collapse
- #lightning_badge(text: nil, color: :default, &block) ⇒ Object
- #lightning_icon(color: :default, name:, text: nil, type:, size: :default) ⇒ Object
Instance Method Details
#lightning_badge(text: nil, color: :default, &block) ⇒ Object
4 5 6 |
# File 'app/helpers/lightning/ui/components_helper.rb', line 4 def lightning_badge(text: nil, color: :default, &block) render(BadgeComponent.new(text: text, color: color), &block) end |
#lightning_icon(color: :default, name:, text: nil, type:, size: :default) ⇒ Object
8 9 10 |
# File 'app/helpers/lightning/ui/components_helper.rb', line 8 def lightning_icon(color: :default, name:, text: nil, type:, size: :default) render(IconComponent.new(color: color, name: name, text: text, type: type, size: size)) end |