Skip to content

Commit 4b380f9

Browse files
committed
docs: highlight code in all docs
1 parent 5579964 commit 4b380f9

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

website/src/docs/astro.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ npx astro add react
6060

6161
> 💡 Add [`client:load`](https://docs.astro.build/es/reference/directives-reference/#clientload) directive to the `Toaster` component.
6262
63-
```js
63+
```js {8,25}
6464
// 📄 layouts/Layout.astro
6565

6666
---
@@ -118,7 +118,7 @@ export default ShowToast;
118118

119119
> 💡 Add [`client:load`](https://docs.astro.build/es/reference/directives-reference/#clientload) directive to the `ShowToast` component.
120120
121-
```js
121+
```js {5,11}
122122
// 📄 pages/index.astro
123123

124124
---

website/src/docs/index.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ category: "Introduction"
2020

2121
2. Add the toast provider:
2222

23-
```jsx {8}
23+
```jsx {3,8}
2424
// 📃 main.tsx
2525

2626
import { Toaster } from '@pheralb/toast';
@@ -35,7 +35,7 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
3535

3636
3. Usage:
3737

38-
```jsx {10-13}
38+
```jsx {3, 10-13}
3939
// 📃 index.tsx
4040

4141
import { toast } from "@pheralb/toast";

website/src/docs/nextjs.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ npx create-next-app@latest
3535

3636
> 💡 By default, `Toaster` includes `use client` directive.
3737
38-
```tsx {1,13}
38+
```tsx {3,14}
3939
// 📃 layout.tsx
4040

4141
import { Toaster } from "@pheralb/toast";
@@ -58,7 +58,7 @@ export default function RootLayout({
5858

5959
3. Use the [`toast`](/toast) function in your **client** components:
6060

61-
```tsx
61+
```tsx {9-11}
6262
"use client";
6363

6464
import { toast } from "@pheralb/toast";
@@ -82,7 +82,7 @@ export default function MyComponent() {
8282

8383
The library exports a CSS file that you can include in your project. Only use in cases where the toast styles do not render correctly:
8484

85-
```tsx
85+
```tsx {5}
8686
// 📄 app/layout.tsx
8787

8888
import type { ReactNode } from "react";

website/src/docs/remix.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ npx create-remix@latest
3939

4040
2. Add the [`Toaster`](/toaster) to the `root.tsx` file:
4141

42-
```tsx
42+
```tsx {3,16}
4343
// 📃 root.tsx
4444

4545
import { Toaster } from "@pheralb/toast";
@@ -70,7 +70,7 @@ export default function App() {
7070

7171
3. Use the [`toast`](/toast) function in your components or pages:
7272

73-
```tsx
73+
```tsx {11-13}
7474
// 📃 index.tsx
7575

7676
import { toast } from "@pheralb/toast";
@@ -99,7 +99,7 @@ The library exports a CSS file that you can include in your project. Only use in
9999

100100
> 💡 Add the following code to the **global `root.tsx` file**.
101101
102-
```tsx
102+
```tsx {5}
103103
// 📄 app/root.tsx
104104

105105
import type { LinksFunction } from "@remix-run/node";

website/src/docs/tanstack.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pnpm create @tanstack/router
3131

3232
2. Add the [`Toaster`](/toaster) to the `routes/__root.tsx` file:
3333

34-
```tsx {13}
34+
```tsx {3,13}
3535
import { Link, Outlet, createRootRoute } from "@tanstack/react-router";
3636
import { TanStackRouterDevtools } from "@tanstack/router-devtools";
3737
import { Toaster } from "@pheralb/toast";
@@ -53,7 +53,7 @@ function RootComponent() {
5353

5454
3. Use the [`toast`](/toast) function in your components or pages:
5555

56-
```tsx
56+
```tsx {2,14-16}
5757
import { createFileRoute } from "@tanstack/react-router";
5858
import { toast } from "@pheralb/toast";
5959

@@ -85,7 +85,7 @@ The library exports a CSS file that you can include in your project. Only use in
8585

8686
> 💡 Add the following code to the **global `src/routes/__root.tsx` file**.
8787
88-
```tsx
88+
```tsx {3,7}
8989
// 📄 src/routes/__root.tsx
9090

9191
import pheralbToastStyles from "@pheralb/toast/dist/styles.css?url";

0 commit comments

Comments
 (0)