Class: PhlexKit::ContextMenuLabel
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::ContextMenuLabel
- Defined in:
- app/components/phlex_kit/context_menu/context_menu_label.rb
Instance Method Summary collapse
-
#initialize(inset: false, **attrs) ⇒ ContextMenuLabel
constructor
A new instance of ContextMenuLabel.
- #view_template ⇒ Object
Methods inherited from BaseComponent
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_template ⇒ Object
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 |