prop-types-table
create a markdown table documenting a React component's propTypes
Last updated 6 months ago by goto-bus-stop .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install prop-types-table 
SYNC missed versions from official npm registry.

prop-types-table

create a markdown table documenting a React component's propTypes

Adapted from material-ui's PropTypeDescription component: https://github.com/callemall/material-ui/blob/82482758573dc714b210529dcf092dab904db0ba/docs/src/app/components/PropTypeDescription.js

Install - Usage - License: Apache-2.0

npm travis standard

Install

npm install prop-types-table

Usage

prop-types-table src/index.js > generated-docs.md

The result looks a bit like this:

Name Type Default Description
video string An 11-character string representing a YouTube video ID..
id string DOM ID for the player element.
className string CSS className for the player element.
width number, string Width of the player element.
height number, string Height of the player element.
onCued function () => {} Sent when the video is cued and ready to play.
onBuffering function () => {} Sent when the video is buffering.

You can use this together with md-insert to put prop type documentation for components into your markdown readme.

prop-types-table src/index.js | md-insert -i README.md --header Props

License

Apache-2.0

Current Tags

  • 1.0.0                                ...           latest (6 months ago)

1 Versions

  • 1.0.0                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 3
Dependencies (2)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |