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

Function DisclosureHeader

starters/tailwind/src/Disclosure.tsx:53–67  ·  view source on GitHub ↗
({children}: DisclosureHeaderProps)

Source from the content-addressed store, hash-verified

51}
52
53export function DisclosureHeader({children}: DisclosureHeaderProps) {
54 let {isExpanded} = useContext(DisclosureStateContext)!;
55 return (
56 <Heading className="text-lg font-semibold m-0">
57 <Button slot="trigger" variant="quiet" className="w-full justify-start font-medium">
58 {({isDisabled}) => (
59 <>
60 <ChevronRight aria-hidden className={chevron({isExpanded, isDisabled})} />
61 <span>{children}</span>
62 </>
63 )}
64 </Button>
65 </Heading>
66 );
67}
68
69export interface DisclosurePanelProps extends AriaDisclosurePanelProps {
70 children: React.ReactNode;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected