import { type ReactNode, useId } from "react";
import { Text } from "../primitives/Text";
import { View } from "../primitives/View";
export interface SidebarNavSectionProps {
/**
* Visible heading, which also names the group for assistive tech. Leave it
* out for the first, untitled group of a sidebar's primary destinations.
*/
title?: string;
/** `SidebarNavItem`s. */
children: ReactNode;
}
export function SidebarNavSection({
title,
children,
}: SidebarNavSectionProps): ReactNode {
const titleId = useId();
if (title === undefined) {
return {children};
}
return (
{title}
{children}
);
}