name | type | description | defaultValue |
---|---|---|---|
children | any | component instance | - |
code | string | demo source code
| - |
doc | string | explanation to this demo
| - |
docgen | arrayOf | component's info load from react-docgen
| [] |
codeVisible | bool | whether show source code | false |
propTypeVisible | bool | whether show propTypes | true |
methodsVisible | bool | whether show methods | false |
className | string | append className to Redemo | - |
mdClassName | string | className pass to markdown | - |
style | object | set style for Redemo | - |
import ReDemo from 'redemo';
<ReDemo
className="my-demo"
propTypes={propTypes}
doc={doc}
code={code}
>
<Button>Hello World</Button>
</ReDemo>