Class: SolidusAdmin::UI::Panel::Component

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/solidus_admin/ui/panel/component.rb

Instance Method Summary collapse

Constructor Details

#initialize(title: nil, title_hint: nil) ⇒ Component

Returns a new instance of Component.

Parameters:

  • title (String) (defaults to: nil)

    the title of the panel

  • title_hint (String) (defaults to: nil)

    the title hint of the panel



27
28
29
30
# File 'app/components/solidus_admin/ui/panel/component.rb', line 27

def initialize(title: nil, title_hint: nil)
  @title = title
  @title_hint = title_hint
end

Instance Method Details

#render_section(wide: false, high: false, **args, &block) ⇒ Object



32
33
34
35
36
37
38
39
# File 'app/components/solidus_admin/ui/panel/component.rb', line 32

def render_section(wide: false, high: false, **args, &block)
  tag.section(**args, class: "
    border-gray-100 border-t w-full first-of-type:border-t-0
    #{'px-6' unless wide}
    #{'py-4' unless high}
    #{args[:class]}
  ", &block)
end