Class: FoxTail::Sidebar::MenuComponent

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

Instance Method Summary collapse

Instance Method Details

#before_renderObject



15
16
17
18
19
# File 'app/components/fox_tail/sidebar/menu_component.rb', line 15

def before_render
  super

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

#callObject



21
22
23
24
25
26
# File 'app/components/fox_tail/sidebar/menu_component.rb', line 21

def call
   :div, class: theme.apply(:container, self) do
    concat render_title if title?
    concat render_menu
  end
end

#render?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/components/fox_tail/sidebar/menu_component.rb', line 11

def render?
  items?
end