Skip to content

Commit f620cde

Browse files
committed
Pass className to Layout component
1 parent c53a98a commit f620cde

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/components/ui/layout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { FC, PropsWithChildren, ReactNode } from 'react'
22
import { SidebarProvider, SidebarTrigger } from './sidebar'
33
import { useIsMobile } from '../../hooks'
44
import { Separator } from './separator'
5+
import { cn } from '../../lib/utils'
56

67
const Header: FC<PropsWithChildren> = ({ children }) => (
78
<header className="mt-0 sticky md:static z-50 top-0">
@@ -44,6 +45,7 @@ interface LayoutProps {
4445
headerBreadcrumbsContent?: ReactNode
4546
footerContent?: ReactNode
4647
sidebar?: ReactNode
48+
className?: string
4749
}
4850

4951
export const Layout: FC<PropsWithChildren<LayoutProps>> = ({
@@ -52,11 +54,12 @@ export const Layout: FC<PropsWithChildren<LayoutProps>> = ({
5254
headerBreadcrumbsContent,
5355
footerContent,
5456
sidebar,
57+
className,
5558
}) => {
5659
const isMobile = useIsMobile()
5760

5861
const layoutContent = (
59-
<div className="w-full max-w-[96rem] mx-auto flex flex-col min-h-[800px] md:max-h-dvh">
62+
<div className={cn('w-full max-w-[96rem] mx-auto flex flex-col min-h-[800px] md:max-h-dvh', className)}>
6063
{headerContent && <Header>{headerContent}</Header>}
6164

6265
{isMobile && (

0 commit comments

Comments
 (0)