0.1.0 • Published 5 years ago

material-component-demo v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

npm package npm downloads licence codecov CircleCI bundlephobia LGTM alerts LGTM grade

A component that allows easy display of nice-looking React component demos, with optional source code display. Designed for easy interoperation with demo-source-loader.

Props

Prop nameTypeRequired?Description
DemoComponentReact componentyesA component containing an operational demo of your compontn. This should not be your actual documented component, but a wrapper that provides any necessary props, state management, imports, etc.
titlestringyesA brief description of the feature being demonstrated
demoSourcestringnoThe source code of the demo component. This will be displayed with syntax highlighting below the demo, and can be expanded and collapsed with a toggle. If not supplied, the toggle will be missing.
markdownstringnoAn explanation of the feature being demonstrated, in Markdown format.
childrenReact nodenoAn explanation of the feature being demonstrated, as a React component. This will be ignored if the markdown prop is supplied

All other props will be spread to the root DOM node.