Skip to content

Commit

Permalink
docs(frameworks): update highlighted line numbers in Frameworks examp…
Browse files Browse the repository at this point in the history
…les (#3412)

* Update highlighted line numbers in Remix examples

* Update highlighted line numbers in Next.js examples

* Update highlighted line numbers in Astro examples

* Update highlighted line numbers in Vite examples

* Adjust highlighted line number

* Adjust highlighted line number
  • Loading branch information
RockerFlower authored Jul 12, 2024
1 parent 049d236 commit b762141
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion apps/docs/content/docs/frameworks/astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ the following code to your `tailwind.config.cjs` file:
**Note**: If you are using pnpm and monorepo architecture, please make sure you are pointing to the ROOT `node_modules`
</Blockquote>

```js {9,14-15}
```js {2,9,14-15}
// tailwind.config.cjs
const { nextui } = require("@nextui-org/react");

Expand Down
22 changes: 11 additions & 11 deletions apps/docs/content/docs/frameworks/nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Filtered results for: Enter something to filter

You still need to add the provider to your app manually (we are working on automating this step).

```jsx {7,9}
```jsx {3,7,9}
// app/providers.tsx

import {NextUIProvider} from '@nextui-org/react'
Expand All @@ -115,7 +115,7 @@ export function Providers({children}: { children: React.ReactNode }) {

<Spacer y={4} />

```jsx {7,9,11}
```jsx {3,7,9,11}
// app/layout.tsx

import {Providers} from "./providers";
Expand Down Expand Up @@ -174,7 +174,7 @@ the following code to your `tailwind.config.js` file:
**Note**: If you are using pnpm and monorepo architecture, please make sure you are pointing to the ROOT `node_modules`
</Blockquote>

```js {9,14-15}
```js {2,9,14-15}
// tailwind.config.js
import {nextui} from "@nextui-org/react";

Expand All @@ -199,7 +199,7 @@ export default config;

Go to your `app/providers.tsx` or `app/providers.jsx` (create it if it doesn't exist) and wrap the Component with the `NextUIProvider`:

```jsx {8,10}
```jsx {4,8,10}
// app/providers.tsx
'use client'

Expand All @@ -218,7 +218,7 @@ export function Providers({children}: { children: React.ReactNode }) {

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

```jsx {6,8,10}
```jsx {2,6,8,10}
// app/layout.tsx
import {Providers} from "./providers";

Expand All @@ -244,7 +244,7 @@ of them by adding the `dark`/`light` class to the `html` tag. See the [theme doc
Now you can import any NextUI component directly in your Server Components without needing to use
the `use client;` directive:

```jsx {2}
```jsx {2,7}
// app/page.tsx
import {Button} from '@nextui-org/button';

Expand Down Expand Up @@ -338,7 +338,7 @@ Filtered results for: Enter something to filter

You still need to add the provider to your app manually (we are working on automating this step).

```jsx {7,9}
```jsx {3,7,9}
// app/providers.tsx

import {NextUIProvider} from '@nextui-org/react'
Expand All @@ -354,7 +354,7 @@ export function Providers({children}: { children: React.ReactNode }) {

<Spacer y={4} />

```jsx {7,9,11}
```jsx {3,7,9,11}
// app/layout.tsx

import {Providers} from "./providers";
Expand Down Expand Up @@ -413,7 +413,7 @@ the following code to your `tailwind.config.js` file:
**Note**: If you are using pnpm and monorepo architecture, please make sure you are pointing to the ROOT `node_modules`
</Blockquote>

```js {9,14-15}
```js {2,9,14-15}
// tailwind.config.js
import {nextui} from "@nextui-org/react";

Expand All @@ -438,7 +438,7 @@ export default config;

Go to pages`/_app.js` or `pages/_app.tsx` (create it if it doesn't exist) and wrap the Component with the `NextUIProvider`:

```jsx {6,8}
```jsx {2,6,8}
// pages/_app.js
import {NextUIProvider} from '@nextui-org/react'

Expand All @@ -457,7 +457,7 @@ export default MyApp;

Now you can import any NextUI component wherever you want:

```jsx {1}
```jsx {1,6}
import {Button} from '@nextui-org/react'

export default function Page() {
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/frameworks/remix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ the following code to your `tailwind.config.js` file:
**Note**: If you are using pnpm and monorepo architecture, please make sure you are pointing to the ROOT `node_modules`
</Blockquote>

```ts {10,15-16}
```ts {2,10,15-16}
// tailwind.config.ts
const { nextui } = require("@nextui-org/react");

Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/docs/frameworks/vite.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ the following code to your `tailwind.config.js` file:
**Note**: If you are using pnpm and monorepo architecture, please make sure you are pointing to the ROOT `node_modules`
</Blockquote>

```js {8,13-14}
```js {2,8,13-14}
// tailwind.config.js
const { nextui } = require("@nextui-org/react");

Expand All @@ -81,7 +81,7 @@ After installing NextUI, you need to set up the `NextUIProvider` at the `root` o

Go to the src directory and inside `main.jsx` or `main.tsx`, wrap `NextUIProvider` around App:

```jsx
```jsx {4,10,12}
// main.tsx or main.jsx
import React from 'react'
import ReactDOM from 'react-dom/client'
Expand Down

0 comments on commit b762141

Please sign in to comment.