Undefined CSS Variable with TailwindCSS #11835
Answered
by
shilman
hmajid2301
asked this question in
Help
-
I am using TailwindCSS with Storybook, I have the following setup: The module.exports = {
theme: {
extend: {
colors: {
primary: 'var(--primary)',
secondary: 'var(--secondary)',
....
},
},
variants: {},
}; My @tailwind base;
@tailwind components;
@tailwind utilities;
.root,
#root {
--primary: #367ee9;
--secondary: #a0aec0;
} and my ...
import '../src/styles/global.css';
... My main issue is that in the import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks';
import { FaSearch as Search, FaSun as Sun } from 'react-icons/fa';
import Icon from './Icon';
<Meta title="Atoms | Icon" component={Icon} />
# Icon
<Preview>
<Story
name="Basic"
args={{
icon: <Search />,
label: 'Search Icon',
}}
>
{(args) => <Icon {...args} />}
</Story>
</Preview>
<Props story="Basic" /> I'm using Storybook UI V6: {
"@storybook/addon-a11y": "6.0.0-beta.20",
"@storybook/addon-actions": "6.0.0-beta.20",
"@storybook/addon-controls": "6.0.0-beta.15",
"@storybook/addon-docs": "6.0.0-beta.20",
"@storybook/addon-essentials": "6.0.0-beta.20",
"@storybook/addon-info": "6.0.0-alpha.2",
"@storybook/addon-storysource": "6.0.0-beta.20",
"@storybook/addon-viewport": "6.0.0-beta.20",
} Below I've attached some screenshots Thanks for any help
|
Beta Was this translation helpful? Give feedback.
Answered by
shilman
Aug 9, 2020
Replies: 1 comment 3 replies
-
Try removing |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
hmajid2301
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try removing
addon-info
, it's deprecated and having different versions can cause strange dependency errors to occur.