Class: Shadcn::MenubarSubTriggerComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::MenubarSubTriggerComponent
- Defined in:
- app/components/shadcn/menubar_sub_trigger_component.rb
Overview
Menubar Sub Trigger component Button that opens a submenu
Constant Summary collapse
- BASE_CLASSES =
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground"
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(inset: false, **options, &block) ⇒ MenubarSubTriggerComponent
constructor
A new instance of MenubarSubTriggerComponent.
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(inset: false, **options, &block) ⇒ MenubarSubTriggerComponent
Returns a new instance of MenubarSubTriggerComponent.
10 11 12 13 |
# File 'app/components/shadcn/menubar_sub_trigger_component.rb', line 10 def initialize(inset: false, **, &block) super(**, &block) @inset = inset end |
Instance Method Details
#call ⇒ Object
15 16 17 |
# File 'app/components/shadcn/menubar_sub_trigger_component.rb', line 15 def call content_tag(:div, trigger_content, trigger_attributes) end |