I’m using storybook 7 and trying to create stories from existing react components which I’m importing from bit. So while creating stories, Im referring a file where some json variable has been declared as any like below.
file.ts
export const contentCard2UpWithIsCTARowProp: any = {
analytics: {
msg: "NET",
description: "TEST",
}
}
My main.ts:
const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [],
framework: {
name: "@storybook/nextjs",
options: {},
}
}
If I remove the any, it is working fine. But I cannot do that. I have tried many solutions mentioned like updating “jsx”: “react” in tsconfig.json, tried installing @babel/core & its dependency modules . Can anyone please help me with this.