({
renderLink,
children,
...props
}: NavigationTreeProps<T> & {renderLink?: LinkProps['render']})
| 19 | import {composeTailwindRenderProps, focusRing} from './utils'; |
| 20 | |
| 21 | export function NavigationTree<T>({ |
| 22 | renderLink, |
| 23 | children, |
| 24 | ...props |
| 25 | }: NavigationTreeProps<T> & {renderLink?: LinkProps['render']}) { |
| 26 | return ( |
| 27 | <RenderLinkContext.Provider value={renderLink}> |
| 28 | <AriaNavigationTree |
| 29 | {...props} |
| 30 | className={composeTailwindRenderProps( |
| 31 | props.className, |
| 32 | 'w-56 max-w-full max-h-72 overflow-auto flex flex-col p-1 gap-0.5 relative border border-neutral-200 dark:border-neutral-700 rounded-lg bg-white dark:bg-neutral-900 outline-none' |
| 33 | )}> |
| 34 | {children} |
| 35 | </AriaNavigationTree> |
| 36 | </RenderLinkContext.Provider> |
| 37 | ); |
| 38 | } |
| 39 | |
| 40 | // The focus ring lives on the row (not the link) so it spans the whole item. Hover/current/ancestor |
| 41 | // state is surfaced as a leading-edge indicator (see indicatorStyles) rather than a full-row |
nothing calls this directly
no test coverage detected