Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(www): update installation of Astro #1958

Merged
merged 7 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/www/content/docs/components/form.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ npm install @radix-ui/react-label @radix-ui/react-slot react-hook-form @hookform

Define the shape of your form using a Zod schema. You can read more about using Zod in the [Zod documentation](https://zod.dev).

```tsx showLineNumbers {4,6-8}
```tsx showLineNumbers {3,5-7}
"use client"

import * as z from "zod"
Expand All @@ -137,7 +137,7 @@ const formSchema = z.object({

Use the `useForm` hook from `react-hook-form` to create a form.

```tsx showLineNumbers {4,14-20,22-27}
```tsx showLineNumbers {3-4,14-20,22-27}
"use client"

import { zodResolver } from "@hookform/resolvers/zod"
Expand Down
12 changes: 6 additions & 6 deletions apps/www/content/docs/installation/astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ Which style would you like to use? › Default
Which color would you like to use as base color? › Slate
Where is your global CSS file? › › ./src/styles/globals.css
Do you want to use CSS variables for colors? › no / yes
Where is your tailwind.config.js located? › tailwind.config.cjs
Where is your tailwind.config.js located? › tailwind.config.mjs
Configure the import alias for components: › @/components
Configure the import alias for utils: › @/lib/utils
Are you using React Server Components? › no
```

### Import the globals.css file

Import the `globals.css` file in the `src/index.astro` file:
Import the `globals.css` file in the `src/pages/index.astro` file:

```ts {2} showLineNumbers
---
Expand All @@ -127,12 +127,12 @@ export default defineConfig({
})
```

### Update tailwind.config.cjs
### Update tailwind.config.mjs

When running `npx shadcn-ui@latest init`, your tailwind config for content will be overwritten. To fix this, change the `content` section with the code below to your `tailwind.config.cjs` file:
When running `npx shadcn-ui@latest init`, your tailwind config for content will be overwritten. To fix this, change the `module.exports` to `export default` and the `content` section with the code below to your `tailwind.config.mjs` file:

```js {2-4} showLineNumbers
module.exports = {
```js {1-4} showLineNumbers
export default {
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
}
```
Expand Down