Class: Shadcn::NavigationMenu::Content::Component
- Inherits:
-
ApplicationViewComponent
- Object
- ViewComponent::Base
- ApplicationViewComponent
- Shadcn::NavigationMenu::Content::Component
- Defined in:
- app/components/shadcn/navigation_menu/content/component.rb
Overview
A panel. It stays inside its own item — see the root for why — so every
class here that reads group-data-[viewport=false]/navigation-menu: is
the one doing the work: the border, the surface, the shadow and the
zoom are all in that half of the string.
data-motion is the direction the panel arrives from, which the
controller sets by comparing the item you left with the one you reached.
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
46 47 48 49 50 51 52 53 54 |
# File 'app/components/shadcn/navigation_menu/content/component.rb', line 46 def element_attributes(**defaults) super(**{ hidden: true, "data-state" => "closed", "data-shadcn--navigation-menu-target" => "content", "data-action" => "pointerenter->shadcn--navigation-menu#pointerEnter " \ "pointerleave->shadcn--navigation-menu#pointerLeave" }.merge(defaults)) end |