Skip to content

Commit b6dfd89

Browse files
committed
fix: readme and storybook doc
1 parent e69911e commit b6dfd89

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

packages/nextjs/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Ultraviolet JS is a utility package to make Ultraviolet UI work with NextJS. This package will guide you through the integration of Ultraviolet UI with Next.js [App Router](https://nextjs.org/docs/app).
66

7-
## Get Started
7+
### Get Started
88

99
```sh
1010
pnpm add @ultraviolet/nextjs @ultraviolet/ui @ultraviolet/themes @emotion/react @emotion/styled @emotion/cache
@@ -40,23 +40,25 @@ export default function RootLayout({
4040
### Limitations
4141

4242
- **Fonts**: Ultraviolet UI uses custom fonts that need to be imported separately. Make sure to import the fonts CSS file in your project's entry point:
43-
```sh
44-
pnpm add @ultraviolet/fonts
45-
```
43+
```sh
44+
pnpm add @ultraviolet/fonts
45+
```
4646

4747
then in you `GlobalStyle` file:
48+
4849
```tsx
4950
"use client"
50-
51+
5152
import '@ultraviolet/fonts/fonts.css'
5253
```
5354

5455
- **Styled Components**: in order to customize an emotion component, you need to import the `styled` function from `@emotion/styled` and use it to create your styled components. Emotion is not yet compatible with server components, so you need to use the `styled` function in a client component. Example:
56+
5557
```tsx
5658
"use client"
57-
59+
5860
import { styled } from '@emotion/styled'
59-
61+
6062
const Button = styled.button`
6163
background-color: #0070f3;
6264
color: white;

packages/ui/src/__stories__/Guides/NextIntegration.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Meta } from '@storybook/blocks'
2-
import Readme from '../../../../../nextjs/README.md?raw'
1+
import { Markdown, Meta } from '@storybook/blocks'
2+
import Readme from '../../../../nextjs/README.md?raw'
33

44
<Meta title="Guides/Next Integration" />
55

0 commit comments

Comments
 (0)