Pine documentation components
npm install @pine-ds/doc-componentsWe started off using Storybook to document our Stencil Web Components. With Stencil you have framework integrations or Output Targets, we were using React. Instead of having multiple versions of Storybook (WebComponents, React, etc), we elected to recreate the common components we used within Storybook (ArgsTable and Canvas).
|name|description|
|---|----|
|docSource|The docs-json output type from Stencil. During compiliation Stencil will generate a JSON file with all of the components metadata. You can read more about docs-json here. It expects the components key.|
|componentName|The name of the component to lookup.|
#### Properties
|name|description|
|----|-----|
|mdxSource|An object of key/value pairs. Each key will render a button that will show the source code.|
javascript
import { DocArgsTable } from '@pine-ds/doc-components';
import { components } from '../../../../dist/docs.json';
`output
!Alt text
$3
`javascript
import { DocCanvas } from '@pine-ds/doc-components'; react:
,
webComponent:
}}>
``output
Default state
!Alt text
Active Tab
!Alt text