react-docgen-props-table
                                
                                 react-docgen-props-table copied to clipboard
                                
                                    react-docgen-props-table copied to clipboard
                            
                            
                            
                        Beautiful Props Table for React Docgen.
react-docgen-props-table (demo)
Beautiful Props Table for React Docgen.
   
This is a standalone version of the (now deprecated) PropsTable component from Docz.
Install
npm install --save react-docgen-props-table
Usage
import React, { Component } from 'react'
import PropsTable from 'react-docgen-props-table'
// this was generated via react-docgen
const docgenInfo = {
  "description": "General component description.",
  "displayName": "MyComponent",
  "methods": [],
  "props": {
    "foo": {
      "type": {
        "name": "number"
      },
      "required": true,
      "description": "Description foo."
    },
    "bar": {
      "type": {
        "name": "string"
      },
      "required": false,
      "description": "Description bar.\n\n- markdown list-item 1\n- markdown list-item 2",
      "defaultValue": {
        "value": "'bar'",
        "computed": false
      }
    },
    "baz": {
      "type": {
        "name": "bool"
      },
      "required": false,
      "description": "Description baz."
    }
  }
}
class Example extends Component {
  render () {
    return (
      <PropsTable props={docgenInfo.props} />
    )
  }
}
Examples
Check out the demo for live examples.
License
Credit goes to Pedro Nauck and docz for the initial implementation.
MIT © transitive-bullshit
Support my OSS work by following me on twitter