Skip to content

Commit

Permalink
feat: fixing code block in getting started mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
syauqi committed Jan 27, 2024
1 parent af0eac3 commit e7cc00a
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions pages/Getstarted.stories.mdx
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" /

>

0 comments on commit e7cc00a

Please sign in to comment.