Skip to content

Commit

Permalink
docs: update tailwind.config.ts to use satisfies operator (#73924)
Browse files Browse the repository at this point in the history
Co-authored-by: Lee Robinson <[email protected]>
  • Loading branch information
JamBalaya56562 and leerob authored Dec 16, 2024
1 parent a10515e commit eae6749
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
5 changes: 2 additions & 3 deletions docs/01-app/01-getting-started/05-css-and-styling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Inside your Tailwind configuration file, add paths to the files that will use th
```ts filename="tailwind.config.ts" highlight={5-7} switcher
import type { Config } from 'tailwindcss'

const config: Config = {
export default {
content: [
'./app/**/*.{js,ts,jsx,tsx,mdx}',
// Or if using `src` directory:
Expand All @@ -127,8 +127,7 @@ const config: Config = {
extend: {},
},
plugins: [],
}
export default config
} satisfies Config
```

```js filename="tailwind.config.js" highlight={4-6} switcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ npx tailwindcss init -p

Inside your Tailwind configuration file, add paths to the files that will use Tailwind class names:

```ts filename="tailwind.config.ts" switcher
```ts filename="tailwind.config.ts" highlight={5-10} switcher
import type { Config } from 'tailwindcss'

const config: Config = {
export default {
content: [
'./app/**/*.{js,ts,jsx,tsx,mdx}', // Note the addition of the `app` directory.
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
Expand All @@ -36,11 +36,10 @@ const config: Config = {
extend: {},
},
plugins: [],
}
export default config
} satisfies Config
```

```js filename="tailwind.config.js" switcher
```js filename="tailwind.config.js" highlight={4-9} switcher
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
Expand Down

0 comments on commit eae6749

Please sign in to comment.