Class: FoxTail::Dropdown::MenuComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/fox_tail/dropdown/menu_component.rb

Instance Method Summary collapse

Instance Method Details

#before_renderObject



13
14
15
16
17
# File 'app/components/fox_tail/dropdown/menu_component.rb', line 13

def before_render
  super

  html_attributes[:class] = classnames theme.apply(:root, self), html_class
end

#callObject



19
20
21
22
23
# File 'app/components/fox_tail/dropdown/menu_component.rb', line 19

def call
   :ul, html_attributes do
    items.each { |item| concat (:li, item) }
  end
end

#render?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/components/fox_tail/dropdown/menu_component.rb', line 9

def render?
  items?
end