Skip to content

Commit

Permalink
docs: highlight code in all docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pheralb committed Jan 25, 2025
1 parent 5579964 commit 4b380f9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions website/src/docs/astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ npx astro add react

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

---
Expand Down Expand Up @@ -118,7 +118,7 @@ export default ShowToast;

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

---
Expand Down
4 changes: 2 additions & 2 deletions website/src/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ category: "Introduction"

2. Add the toast provider:

```jsx {8}
```jsx {3,8}
// 📃 main.tsx

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

3. Usage:

```jsx {10-13}
```jsx {3, 10-13}
// 📃 index.tsx

import { toast } from "@pheralb/toast";
Expand Down
6 changes: 3 additions & 3 deletions website/src/docs/nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ npx create-next-app@latest

> 💡 By default, `Toaster` includes `use client` directive.
```tsx {1,13}
```tsx {3,14}
// 📃 layout.tsx

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

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

```tsx
```tsx {9-11}
"use client";

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

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:

```tsx
```tsx {5}
// 📄 app/layout.tsx

import type { ReactNode } from "react";
Expand Down
6 changes: 3 additions & 3 deletions website/src/docs/remix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ npx create-remix@latest

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

```tsx
```tsx {3,16}
// 📃 root.tsx

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

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

```tsx
```tsx {11-13}
// 📃 index.tsx

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

> 💡 Add the following code to the **global `root.tsx` file**.
```tsx
```tsx {5}
// 📄 app/root.tsx

import type { LinksFunction } from "@remix-run/node";
Expand Down
6 changes: 3 additions & 3 deletions website/src/docs/tanstack.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pnpm create @tanstack/router

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

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

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

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

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

> 💡 Add the following code to the **global `src/routes/__root.tsx` file**.
```tsx
```tsx {3,7}
// 📄 src/routes/__root.tsx

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

0 comments on commit 4b380f9

Please sign in to comment.