Class: FoxTail::SidebarComponent

Inherits:
BaseComponent show all
Defined in:
app/components/fox_tail/sidebar_component.rb

Instance Attribute Summary

Attributes inherited from BaseComponent

#html_attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseComponent

classname_merger, #initialize, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class

Methods inherited from Base

fox_tail_config

Constructor Details

This class inherits a constructor from FoxTail::BaseComponent

Class Method Details

.stimulus_controller_nameObject



47
48
49
# File 'app/components/fox_tail/sidebar_component.rb', line 47

def stimulus_controller_name
  :drawer
end

Instance Method Details

#before_renderObject



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

def before_render
  super

  with_divider if !divider && dividers?

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

#callObject



28
29
30
31
32
33
# File 'app/components/fox_tail/sidebar_component.rb', line 28

def call
   :div, html_attributes do
    concat header if header?
    concat render_menus if menus?
  end
end