mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-02-09 02:49:29 +08:00
45 lines
1.3 KiB
TypeScript
45 lines
1.3 KiB
TypeScript
import { Inter as FontSans } from "@next/font/google"
|
|
|
|
import "@/styles/globals.css"
|
|
import { cn } from "@/lib/utils"
|
|
import { Analytics } from "@/components/analytics"
|
|
import { SiteFooter } from "@/components/site-footer"
|
|
import { SiteHeader } from "@/components/site-header"
|
|
import { TailwindIndicator } from "@/components/tailwind-indicator"
|
|
import { ThemeProvider } from "@/components/theme-provider"
|
|
|
|
const fontSans = FontSans({
|
|
subsets: ["latin"],
|
|
variable: "--font-sans",
|
|
})
|
|
|
|
interface RootLayoutProps {
|
|
children: React.ReactNode
|
|
}
|
|
|
|
export default function RootLayout({ children }: RootLayoutProps) {
|
|
return (
|
|
<>
|
|
<html lang="en" suppressHydrationWarning>
|
|
<head />
|
|
<body
|
|
className={cn(
|
|
"min-h-screen bg-white font-sans text-slate-900 antialiased dark:bg-slate-900 dark:text-slate-50",
|
|
fontSans.variable
|
|
)}
|
|
>
|
|
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
|
<div className="flex min-h-screen flex-col">
|
|
<SiteHeader />
|
|
<div className="container flex-1">{children}</div>
|
|
<SiteFooter />
|
|
</div>
|
|
<TailwindIndicator />
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
<Analytics />
|
|
</>
|
|
)
|
|
}
|