Files

24 lines
708 B
TypeScript
Raw Permalink Normal View History

2026-10-05 18:10:18 -04:00
import React from 'react';
2026-10-12 19:14:14 -04:00
import { cn } from '@/lib/cn';
2026-10-05 18:10:18 -04:00
interface Props {
navigation: React.ReactNode;
2026-10-12 19:14:14 -04:00
className?: string;
2026-10-05 18:10:18 -04:00
children?: React.ReactNode;
}
/** Stacked by default; a sidebar row when `<html data-sub-navigation="side">` is set. */
2026-10-12 19:14:14 -04:00
const SubNavigationLayout = ({ navigation, className, children }: Props) => (
<div
className={cn(
'side-navigation:mx-auto side-navigation:flex side-navigation:w-full side-navigation:max-w-panel side-navigation:items-start',
className
)}
>
2026-10-05 18:10:18 -04:00
{navigation}
2026-10-08 16:53:20 -04:00
<div className='side-navigation:min-w-0 side-navigation:flex-1'>{children}</div>
2026-10-05 18:10:18 -04:00
</div>
);
export default SubNavigationLayout;