You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -8,13 +9,15 @@ sidebar_label: Design System Integration
8
9
## Introduction
9
10
A consistent design system is integrated to the all of the app types by using `nextui` and `theme.js` file which can be generated by using the structure defined by [nextui create theme](https://nextui.org/docs/theme/typescript#create-theme) docs and using nextui `createTheme` method.
10
11
11
-
`nextui` is a library that uses stitches internally to style components in the react ecosystem. It allows users to write styles in css within the js files. It also has components and provides customized theming. To know more about nextui visit [nextui org](https://nextui.org/docs/guide/getting-started) docs.
12
+
`nextui` is a library that uses [stitches](https://stitches.dev/) internally to style components in the react ecosystem. It allows users to write styles in css within the js files. It also has components and provides customized theming. To know more about nextui visit [nextui org](https://nextui.org/docs/guide/getting-started) docs.
12
13
13
-
`nextui` provides `<NextUIProvider>` which is a theme provider component which accepts a `theme` prop (created using createTheme nextui method and json) which overrides the nextui default theme. The `<NextUIProvider>` is kept at the highest level in the component chain. This allows all of the components within it to inherit the `theme` prop. In case of our Next.js app the `<NextUIProvider>` is added in `src/pages/_app.js`.
14
+
`nextui` provides `<NextUIProvider>` which is a theme provider component which accepts a `theme` prop (created using createTheme nextui method and json) which overrides the nextui default theme.
14
15
15
16
## How to use
16
-
1. Create a theme using the structure defined by [nextui create theme](https://nextui.org/docs/theme/typescript#create-theme) and store it as `src/themes/theme.js`.
17
-
2. Now in all `nextui` styled components, theme prop is available to use as following:
17
+
1. The `<NextUIProvider>` is kept at the highest level in the component chain. This allows all of the components within it to inherit the `theme` prop. In case of our Next.js app the `<NextUIProvider>` is added in `src/pages/_app.js`.
18
+
2.`nextui` provides a default theme that can be used out of the box.
19
+
3. To customize, create a theme using the structure defined by [nextui create theme](https://nextui.org/docs/theme/typescript#create-theme) and wrap it in `createTheme` nextui method and store it as `src/themes/theme.js`.
20
+
4. Now in all `nextui` styled components, theme props is available to use as following:
length:'1'// this property is added temporarily for the issue of nextui styled method with typescript v4.6.2. Will not be required once the issue is resolved.
30
+
length:'1'
28
31
});
29
32
```
30
33
34
+
## Know Issue
35
+
The `length` property used in styled method is added temporarily for the issue of nextui styled method with typescript v4.6.2. Will not be required once the issue is resolved.
0 commit comments