6.3.1 • Published 2 years ago

storybook-addon-designs v6.3.1

Weekly downloads
131,952
License
MIT
Repository
github
Last release
2 years ago

storybook-addon-designs

A Storybook addon that embed Figma or websites in the addon panel for better design-development workflow.

  • Demo (WIP)

Requirements

  • Storybook@>=5.0.0

This addon should work well with any framework: If you find the case the addon not works, please open an issue.

Getting started

  1. Install
npm install --save-dev storybook-addon-designs
# yarn add -D storybook-addon-designs
  1. Register the addon in addons.js
// .storybook/addons.js

import 'storybook-addon-designs/register'
  1. Add it to story!
import { withDesign } from 'storybook-addon-designs'

storiesOf('My stories', module)
  .addDecorator(withDesign)
  .add('My awesome story', () => <Button>Hello, World!</Button>, {
    design: {
      type: 'figma',
      url: 'https://www.figma.com/file/LKQ4FJ4bTnCSjedbRpk931/Sample-File'
    }
  })

Usage

Add withDesign decorator then put design parameter to your story.

NOTE: If you omit design parameter, the addon does nothing.

The type of design parameter is differ by embed type. If you have basic knowledge of TypeScript, type definition file will help you a lot.

iframe type

Just show the specified website in <iframe> element.

{
  type: 'iframe',

  // An URL to show in iframe
  url: 'https://foo.bar',

  // Optional. Whether to allow embed sites to enter fullscreen mode.
  // default: false
  allowFullscreen: true
}

figma type

Embedding Figma Live Embed Kit. Copy the URL from the browser search bar then paste it to url field.

{
  type: 'figma',

  // An URL for the file/node/prototype
  // Just copy&paste browsers URL bar!
  url: 'https://www.figma.com/file/LKQ4FJ4bTnCSjedbRpk931'

  // (From Figma's doc)
  // ... something that identifies your site.
  embedHost: 'storybook'

  // In addition to these options, this type inherit options from `iframe` type
}

Related projects

change-ad-components@vimbu/storybookkushkiconnectvt@onvitech/design-systemtemp-connect-ui-acceltest-connect-bundlervimbu-web-storybook@cambridgecore/cup-pattern-library@everything-registry/sub-chunk-2830tempppppppppstorybook-web-uikitstorybook-design-system-drapostorybook-design-system-teststorybook-design-system-test-manonstorybook-mobile-uikittestttbuildbabeltestttbuildbabelfinaltestttbuildbabelfinal2testtbredcrumtestconnectfinalfinaltestconnectttttttttestconnectv1theoderic_component@damaris-ui/storybookjiffy-iconsjiffy-uikaran-testiqm-react-librarytwmuictttttt-kjhstuya-design-system@claimini/ui-components@codecademy/styleguide@edma/components@funda/storybook-wrapper-helper@infinitebrahmanuniverse/nolb-story@kushki/connect-ui@eratech/complex@inube/design-system@jpdeployable/deployable-design-system@rexlabs/plz-cli@shivam24161/simple24161@sihq/ui-components@simuratli/uds@sentrei/storybooksabai-uinoface-sbperseus-ui-componentsskzet-backendgpap_storybemotion-packagefe-sbfluna-ui-libraryindependenceaustralia-design-libraryluca-components-library-cincoluca-components-library-cuatroluca-components-library-dosluca-components-library-public-testluca-components-library-tresluca-components-library-unokushkiconnectkushkiconnecttest@xola/ui-kit@wfp/ui@ueberbit/drupal-storybookandreyaui-integrationaui-javaenabledauiintegrationtestconnectdefinitivecordage-ioconnect-test-dherreraconnect-test-uiconnect-version-testconnecttestgutierrezconnectui-testconnctuicarlosgutcomponent-library-pro-interface.buttondesign-system-simplefidesign-system-dev-testdesign-system-dev
7.0.0-alpha.3

3 years ago

7.0.0-beta.2

2 years ago

7.0.0-beta.0

3 years ago

7.0.0-beta.1

2 years ago

7.0.0-alpha.1

3 years ago

7.0.0-alpha.0

3 years ago

6.3.0

3 years ago

6.3.1

3 years ago

7.0.0-alpha.2

3 years ago

6.2.1

3 years ago

6.2.0

4 years ago

6.1.0

4 years ago

6.0.1

4 years ago

5.4.6

4 years ago

6.0.0-beta.1

4 years ago

6.0.0

4 years ago

6.0.0-beta.2

4 years ago

6.0.0-beta.0

4 years ago

6.0.0-alpha.3

4 years ago

5.4.5

4 years ago

5.4.4

4 years ago

6.0.0-alpha.2

4 years ago

5.4.3

4 years ago

6.0.0-alpha.0

4 years ago

6.0.0-alpha.1

4 years ago

5.4.2

5 years ago

5.4.1

5 years ago

5.4.0

5 years ago

5.3.0

5 years ago

5.3.0-beta.1

5 years ago

5.3.0-beta.0

5 years ago

5.3.0-alpha.2

5 years ago

5.2.1

5 years ago

5.3.0-alpha.1

5 years ago

5.3.0-alpha.0

5 years ago

5.2.0

5 years ago

5.1.2

5 years ago

5.1.1

6 years ago

5.1.0

6 years ago

5.0.0

6 years ago

5.0.0-alpha.9

6 years ago

5.0.0-alpha.8

6 years ago

5.0.0-alpha.7

6 years ago

5.0.0-alpha.4

6 years ago

5.0.0-alpha.3

6 years ago

5.0.0-alpha.2

6 years ago

5.0.0-alpha.1

6 years ago