Class: Shadcn::NavigationMenuTriggerComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/shadcn/navigation_menu_trigger_component.rb

Overview

Trigger button that opens navigation menu content

Constant Summary collapse

TRIGGER_CLASSES =
[
  "group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2",
  "text-sm font-medium transition-colors",
  "hover:bg-accent hover:text-accent-foreground",
  "focus:bg-accent focus:text-accent-foreground focus:outline-none",
  "disabled:pointer-events-none disabled:opacity-50",
  "data-[state=open]:bg-accent/50"
].join(" ").freeze

Instance Attribute Summary

Attributes inherited from BaseComponent

#class_name, #data, #html_options

Instance Method Summary collapse

Methods inherited from BaseComponent

#content, #initialize

Methods included from Rails::Helpers::ClassNameHelper

#cn

Constructor Details

This class inherits a constructor from Shadcn::BaseComponent

Instance Method Details

#callObject



15
16
17
# File 'app/components/shadcn/navigation_menu_trigger_component.rb', line 15

def call
  (:button, trigger_content, trigger_attributes)
end