How to use the storybook-addon-designs.config function in storybook-addon-designs

To help you get started, we’ve selected a few storybook-addon-designs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pocka / storybook-addon-designs / packages / examples / stories / index.stories.js View on Github external
.addDecorator(withDesign)
  .add('Embed multiple designs', () =&gt; <button>Button</button>, {
    design: config([
      {
        type: 'figma',
        url:
          'https://www.figma.com/file/Klm6pxIZSaJFiOMX5FpTul9F/storybook-addon-designs-sample'
      },
      {
        type: 'pdf',
        url: samplePdf
      }
    ])
  })
  .add('Set tab names', () =&gt; <button>Button</button>, {
    design: config([
      {
        name: 'Foo',
        type: 'figma',
        url:
          'https://www.figma.com/file/Klm6pxIZSaJFiOMX5FpTul9F/storybook-addon-designs-sample'
      },
      {
        name: 'Bar',
        type: 'pdf',
        url: samplePdf
      }
    ])
  })

storiesOf('Tests|Placeholder', module)
  .addDecorator(withDesign)

storybook-addon-designs

Storybook addon for embedding your design preview in addon panel

MIT
Latest version published 2 years ago

Package Health Score

65 / 100
Full package analysis