1
0
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-12-10 23:42:37 +01:00

refactor: components struture

This commit is contained in:
2024-07-31 11:41:39 +02:00
parent ceeeb2f9c5
commit b5c50728de
72 changed files with 122 additions and 114 deletions

View File

@@ -0,0 +1,24 @@
import { classNames } from "@repo/config-tailwind/classNames"
export interface MainLayoutProps
extends React.ComponentPropsWithoutRef<"main"> {
className?: string
center?: boolean
}
export const MainLayout: React.FC<MainLayoutProps> = (props) => {
const { className, center = false, ...rest } = props
return (
<main
className={classNames(
"min-h-[calc(100vh-188px)] md:mx-auto md:max-w-4xl lg:max-w-7xl",
{
"flex flex-col items-center justify-center text-center": center,
},
className,
)}
{...rest}
/>
)
}