Class: UI::Dropdown::Item

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

Constant Summary

Constants inherited from Base

Base::TAILWIND_MERGER

Instance Method Summary collapse

Methods inherited from Base

#before_template

Instance Method Details

#view_templateObject



9
10
11
12
13
14
15
16
17
18
19
# File 'app/views/ui/dropdown/item.rb', line 9

def view_template(&)
  tag do
    render Icon(name: icon, class: "text-gray-500") if icon?

    div class: text_classes do
      yield
    end

    render Icon(name: trailing_icon, class: "text-gray-500") if trailing_icon?
  end
end