storybook-pretty-props
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.1 • Public • Published

    storybook-pretty-props

    Render prop types from react-docgen or react-docgen-typescript in a pretty way. Useful for storybook addons that display prop types.

    Installation

    npm i storybook-pretty-props
    # with yarn 
    yarn add storybook-pretty-props

    Usage

    Combine this with docgen output to render the prop type!

    import PrettyPropType from "storybook-pretty-props";
     
    const Example = () => (
      <PrettyPropType
        propType={{
          name: "enum",
          value: [
            { name: "literal", value: "a" },
            { name: "literal", value: "b" },
            { name: "literal", value: "c" }
          ]
        }}
      />
    );

    Contributors ✨

    Thanks goes to these wonderful people (emoji key):


    Andrew Lisowski

    💻 📖 💡 ⚠️

    Peter Mikitsh

    💡 💻

    This project follows the all-contributors specification. Contributions of any kind welcome!

    Keywords

    none

    Install

    npm i storybook-pretty-props

    DownloadsWeekly Downloads

    67,583

    Version

    1.2.1

    License

    MIT

    Unpacked Size

    80.4 kB

    Total Files

    83

    Last publish

    Collaborators

    • alisowski