({children}: DisclosureHeaderProps)
| 51 | } |
| 52 | |
| 53 | export 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 | |
| 69 | export interface DisclosurePanelProps extends AriaDisclosurePanelProps { |
| 70 | children: React.ReactNode; |
nothing calls this directly
no outgoing calls
no test coverage detected