Skip to content

Commit

Permalink
πŸ”¨ settings: radix UI Theme ν”„λ‘œλ°”μ΄λ” μ„ΈνŒ… #9
Browse files Browse the repository at this point in the history
  • Loading branch information
froggy1014 committed Jul 30, 2024
1 parent 6ca1224 commit 1e8734f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import "../styles/reset.css";
import "@radix-ui/themes/styles.css";
import "../styles/globals.css";

import type { Metadata } from "next";
import { Inter } from "next/font/google";

import MobileLayout from "@/layout/Mobile/MobileLayout";
import RadixThemeProvider from "@/lib/RadixThemeProvider";
import ReactQueryProvider from "@/lib/ReactQueryProvider";

const inter = Inter({ subsets: ["latin"] });
Expand All @@ -23,7 +25,9 @@ export default function RootLayout({
<html lang="ko">
<body className={`${inter.className}`} suppressHydrationWarning>
<ReactQueryProvider>
<MobileLayout>{children}</MobileLayout>
<RadixThemeProvider>
<MobileLayout>{children}</MobileLayout>
</RadixThemeProvider>
</ReactQueryProvider>
</body>
</html>
Expand Down
13 changes: 13 additions & 0 deletions src/lib/RadixThemeProvider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"use client";
import { Theme, ThemePanel } from "@radix-ui/themes";

function RadixThemeProvider({ children }: React.PropsWithChildren) {
return (
<Theme>
{children}
<ThemePanel />
</Theme>
);
}

export default RadixThemeProvider;

0 comments on commit 1e8734f

Please sign in to comment.