I use webpack5, typescript, tailwindcss and storybook to make an Button UI component, I modify the example code from storybook to tailwindcss Here is the css code:
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.storybook-button {
@apply font-sans font-bold border-none rounded-3xl cursor-pointer inline-block leading-3;
}
.storybook-button--primary {
@apply text-white bg-[#1ea7fd];
}
.storybook-button--secondary {
@apply text-[#333] bg-[]
color: #333 bg-transparent shadow-cyan-500/50;
}
.storybook-button--small {
@apply text-xs px-4 py-2;
}
.storybook-button--medium {
@apply text-sm px-5 py-3;
}
.storybook-button--large {
@apply text-base px-6 py-3;
}
}
But when I run yarn storybook, this css file is not working Button in storybook with tailwindcss