Class: PhlexKit::ContextMenuLabel

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/context_menu/context_menu_label.rb

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(inset: false, **attrs) ⇒ ContextMenuLabel

Returns a new instance of ContextMenuLabel.



3
4
5
6
# File 'app/components/phlex_kit/context_menu/context_menu_label.rb', line 3

def initialize(inset: false, **attrs)
  @inset = inset
  @attrs = attrs
end

Instance Method Details

#view_templateObject



7
8
9
# File 'app/components/phlex_kit/context_menu/context_menu_label.rb', line 7

def view_template(&)
  div(**mix({ class: [ "pk-context-menu-label", (@inset ? "inset" : nil) ].compact.join(" ") }, @attrs), &)
end