Class: UI::Badge

Inherits:
Base
  • Object
show all
Defined in:
app/views/ui/badge.rb

Constant Summary

Constants inherited from Base

UI::Base::TAILWIND_MERGER

Instance Method Summary collapse

Methods inherited from Base

#before_template

Instance Method Details

#view_templateObject



15
16
17
18
19
20
# File 'app/views/ui/badge.rb', line 15

def view_template
  div class: classes, data: do
    UI::Icon(name: icon, class: icon_classes, size: :sm) if icon.present?
    span { text }
  end
end