material-component-demo

0.1.0 • Public • Published

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 name Type Required? Description
DemoComponent React component yes A 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.
title string yes A brief description of the feature being demonstrated
demoSource string no The 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.
markdown string no An explanation of the feature being demonstrated, in Markdown format.
children React node no An 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.

Package Sidebar

Install

npm i material-component-demo

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

1.78 MB

Total Files

26

Last publish

Collaborators

  • duncan-thacker