-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: fixing code block in getting started mdx
- Loading branch information
Showing
1 changed file
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,53 @@ | ||
import { Meta } from '@storybook/addon-docs'; | ||
import { Meta, Source } from '@storybook/addon-docs'; | ||
|
||
<Meta title="Get Started" /> | ||
|
||
# Getting Started | ||
|
||
Welcome to Bootwind UI – the ultimate toolkit for creating beautiful, responsive user interfaces with ease. Follow these steps to quickly integrate Bootwind UI into your project. | ||
|
||
## **Install** | ||
|
||
Bootwind UI should be installed as a `dependency` of your app. | ||
|
||
```sh | ||
<Source | ||
code={` | ||
yarn add @bootwindproject/bootwindui | ||
``` | ||
`} | ||
language="sh" | ||
/> | ||
|
||
## **Setup** | ||
|
||
Bootwind UI components are styled using CSS in JS. This technique requires a style renderer which inserts CSS into DOM when needed. React context is used to provide the style renderer. | ||
|
||
Place a `<BootwindProvider />` at the root of your app and pass theme as a prop. | ||
|
||
```jsx | ||
<Source | ||
code={` | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { BootwindProvider } from '@bootwindproject/bootwindui'; | ||
import App from './App'; | ||
ReactDOM.render( | ||
<BootwindProvider> | ||
<App /> | ||
</BootwindProvider>, | ||
document.getElementById('root') | ||
); | ||
``` | ||
<BootwindProvider> | ||
<App /> | ||
</BootwindProvider> | ||
, document.getElementById('root') ); `} language="jsx" /> | ||
|
||
## **Usage** | ||
|
||
That's it. You can now use Bootwind UI components in your app. | ||
|
||
```jsx | ||
<Source | ||
code={` | ||
import React from 'react'; | ||
import { Button } from '@bootwindproject/bootwindui'; | ||
export default () => <Button color="primary">Get started</Button>; | ||
``` | ||
`} language="jsx" / | ||
|
||
> |