1.0.0-1 • Published 7 years ago
system-docs v1.0.0-1
system-docs
WIP
Parses metadata from system-components for documentation.
Requires components built with system-components >2.2.0
npm i -D system-docsimport Button from '../src/Button'
import parse from 'system-docs'
const metadata = parse(Button)Returns a metadata object with the following:
tagName: the underlying HTML tag nameextensions: an array of components that the component extends with theisproppropTypes: an object of metadata for each propType with the following:prop: name of the propthemeKey: key used for value lookups in thethemeobjectstyleType: (string) one ofdefault,responsive,complex, orpseudo
The object also includes all static properties of the component,
including defaultProp and any other properties added manually, such as displayName.