Replies: 1 comment
-
Issue found incorrect import React, {FunctionComponent} from "react";
/** @type { import('@storybook/react').Preview } */
const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
};
export const decorators = [
(Story: FunctionComponent) => (
<div>
<div>
test123
</div>
<Story/>
</div>
),
]
export default preview; correct import React, {FunctionComponent} from "react";
/** @type { import('@storybook/react').Preview } */
const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
decorators: [
(Story: FunctionComponent) => (
<div>
<div>
test123
</div>
<Story/>
</div>
),
]
};
export default preview; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I installed thew new @storybook/experimental-addon-test, it seems pretty nice.
however, im facing an issue where decorators from preview.tsx are not being applied to my story components,
is this intentional?
Additional information
If you want to reproduce it:
Node 18
1- clone my repo
2- install all dependencies
3- npx playwright install --with-deps chromium
4- run
npx vitest
test result:
story
setup.ts
preview.ts
vitest.workspace.ts
Create a reproduction
https://github.com/elidon555/taskbox
Beta Was this translation helpful? Give feedback.
All reactions