Component controls stories. Write your components documentation with MDX and JSX. Design, develop, test and review in a single site.
Edit this page
created:1/14/2022
updated:1/14/2022

Playground

Import

playground.mdx

---
name: Playground
menu: Components
---
import { Playground } from '@component-controls/blocks';

Basic usage

Single child

Stateful

0

Story wrapper

You can wrap the example code in a <Story /> component - this will give you an identifier (story id) to reference this specific example of code.

playground.mdx

---
name: Playground
menu: Components
---
import { Playground, Story } from '@component-controls/blocks';
import { Button } from '../src/components/Button'
# Button
<Playground>
<Story name='example'>
<Button kind="secondary">Click me</Button>
</Story>
</Playground>