yarastqt / storybook-addons

Collect unofficial addons for storybook.
https://storybook-addons.now.sh
8 stars 1 forks source link

Props table #143

Open yarastqt opened 4 years ago

yarastqt commented 4 years ago

Proposal

Add feature for extract props from component.

Usage

Example component:

type ButttonProps = {
  type: string
}

export const Button: FC<ButtonProps> = () => {}

Example declaration:

export default {
  parameters: {
    docs: {
      readme: '...',
      props: {
        ButtonProps: Button
      }
    }
  }
}

Examples usage via placeholder:

{{%props::ButtonProps%}}