Class: Shadcn::ContextMenu::Content::Component
- Inherits:
-
ApplicationViewComponent
- Object
- ViewComponent::Base
- ApplicationViewComponent
- Shadcn::ContextMenu::Content::Component
- Defined in:
- app/components/shadcn/context_menu/content/component.rb
Overview
The panel. Its own class string rather than the dropdown's, for one
reason worth stating: the two differ only in which --radix-* custom
properties they read, and those are the properties popper.js writes
under the controller's prefix. Sharing the string would leave the
menu reading variables nothing sets.
Constant Summary
Constants inherited from ApplicationViewComponent
ApplicationViewComponent::CONTENTS_STYLE, ApplicationViewComponent::VOID_TAGS
Instance Attribute Summary
Attributes inherited from ApplicationViewComponent
Instance Method Summary collapse
Methods inherited from ApplicationViewComponent
#call, #css_classes, default_tag, #initialize, #merged_style, #render_element, #shadcn_t, slot_name, #style_variants, #tag_name
Constructor Details
This class inherits a constructor from Shadcn::ApplicationViewComponent
Instance Method Details
#element_attributes(**defaults) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'app/components/shadcn/context_menu/content/component.rb', line 28 def element_attributes(**defaults) super(**{ role: "menu", hidden: true, "data-state" => "closed", "data-shadcn--dropdown-menu-target" => "content", "data-action" => "keydown->shadcn--dropdown-menu#contentKeydown" }.merge(defaults)) end |