Giter VIP home page Giter VIP logo

Comments (4)

pocka avatar pocka commented on May 28, 2024

The package name has been changed from storybook-addon-designs to @storybook/addon-designs from v7.
The current online doc (GHPages) is not updated to the latest version (v7).
Refer to README.md for the time being.

I don't know about Next.js + Storybook integration stuff but looking at your versions and the error message, it should work on the latest version of the addon.

from addon-designs.

TsengTofu avatar TsengTofu commented on May 28, 2024

The package name has been changed from storybook-addon-designs to @storybook/addon-designs from v7. The current online doc (GHPages) is not updated to the latest version (v7). Refer to README.md for the time being.

I don't know about Next.js + Storybook integration stuff but looking at your versions and the error message, it should work on the latest version of the addon.

Pocka, thank you πŸ™ŒπŸ»

According to your answer, I do this to get what I want.
main.js => the storybook setting file

// change the addon name
addons: [
    '@storybook/addon-links',
    '@storybook/addon-essentials',
    '@storybook/addon-onboarding',
    '@storybook/addon-interactions',
    '@storybook/addon-designs',
],

preview.js => the docs mentioned steps, as you said might not update

// remove this line
import { withDesign } from 'storybook-addon-designs';
const preview = {
  ...preview,
  // remove this line
  decorators: [withDesign],
};

And in my component story below:

parameters = {
  design: {
    type: 'figspec',
    accessToken: '',
    url: ''
  },
}

Works fine✨✨✨✨✨✨✨

Here is the snapshot for my packages version:
storybook: ^7.5.3
Other addons
image

Hope it can help other people.
And thanks again, without your hint, I won't get it work.

from addon-designs.

MrSunshyne avatar MrSunshyne commented on May 28, 2024

@pocka Is the "withDesign" decorator no longer required? What was it's purpose? I can't seem to find docs about it.
I see it in an existing codebase, and i'm not sure what I lose by removing it.

from addon-designs.

pocka avatar pocka commented on May 28, 2024

@MrSunshyne See #144. TL;DR is you don't need the decorator and it has been there for unknown reasons (probably mistake).

from addon-designs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.