Skip to content

Commit

Permalink
chore(docs): add global css import to root layout (#2688)
Browse files Browse the repository at this point in the history
* Adds global css import to root layout

* refactor(docs): include globals css info in other examples

---------

Co-authored-by: Eli <[email protected]>
Co-authored-by: WK Wong <[email protected]>
  • Loading branch information
3 people authored Sep 8, 2024
1 parent 84c1574 commit f0eb7a6
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions apps/docs/content/docs/frameworks/nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,12 @@ export function Providers({children}: { children: React.ReactNode }) {

<Spacer y={4} />

```jsx {3,7,9,11}
```jsx {6,10,12,14}
// app/layout.tsx

// globals.css includes @tailwind directives
// adjust the path if necessary
import "@/styles/globals.css";
import {Providers} from "./providers";

export default function RootLayout({children}: { children: React.ReactNode }) {
Expand Down Expand Up @@ -218,8 +221,12 @@ export function Providers({children}: { children: React.ReactNode }) {

Now, Go to your `root` layout page and wrap it with the `Providers`:

```jsx {2,6,8,10}
```jsx {6,10,12,14}
// app/layout.tsx

// globals.css includes @tailwind directives
// adjust the path if necessary
import "@/styles/globals.css";
import {Providers} from "./providers";

export default function RootLayout({children}: { children: React.ReactNode }) {
Expand Down Expand Up @@ -354,9 +361,12 @@ export function Providers({children}: { children: React.ReactNode }) {

<Spacer y={4} />

```jsx {3,7,9,11}
```jsx {6,10,12,14}
// app/layout.tsx

// globals.css includes @tailwind directives
// adjust the path if necessary
import "@/styles/globals.css";
import {Providers} from "./providers";

export default function RootLayout({children}: { children: React.ReactNode }) {
Expand Down

0 comments on commit f0eb7a6

Please sign in to comment.