MCPcopy Create free account
hub / github.com/adobe/react-spectrum / MenuSection

Function MenuSection

starters/tailwind/src/Menu.tsx:69–82  ·  view source on GitHub ↗
(props: MenuSectionProps<T>)

Source from the content-addressed store, hash-verified

67}
68
69export function MenuSection<T>(props: MenuSectionProps<T>) {
70 return (
71 <AriaMenuSection
72 {...props}
73 className="first:-mt-[5px] after:content-[''] after:block after:h-[5px]">
74 {props.title && (
75 <Header className="text-sm font-semibold text-neutral-500 dark:text-neutral-300 px-4 py-1 truncate sticky -top-[5px] -mt-px -mx-1 z-10 bg-neutral-100/60 dark:bg-neutral-700/60 backdrop-blur-md supports-[-moz-appearance:none]:bg-neutral-100 border-y border-y-neutral-200 dark:border-y-neutral-700 [&+*]:mt-1">
76 {props.title}
77 </Header>
78 )}
79 <Collection items={props.items}>{props.children}</Collection>
80 </AriaMenuSection>
81 );
82}
83
84interface MenuTriggerProps extends AriaMenuTriggerProps {
85 placement?: PopoverProps['placement'];

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected