I was exploring the source code of the @atlaskit/storybook-addon-design-system package and noticed that index.ts inside the src directory exports an empty object ({}).
index.ts
src
{}
when i try to import withDesignTokens function for setting decorator in storybook config file then i got empty object error. How to solve this problem?
and also if i try to import withDesignTokens from decorator file inside src folder then type is not matched with what storybook decorator is seeking?
Hi @Goutam Singla
This addon is designed to be used via Storybook configuration, not by manually importing decorators.
You should register/inject it in .storybook/main.ts
export default { addons: ['@atlaskit/storybook-addon-design-system'],};
If you need a design token decorator, instead of using withDesignTokens, use the Atlaskit setup
import { setGlobalTheme } from '@atlaskit/tokens';
this is the supported way to enable design tokens.
Please take it with a pinch of salt, but you may find more answers if you post this to Atlassian Developer Community.
It looks like you're new here. Sign in or register to get started.