Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dosen't work with storybook/html #1

Closed
neginbasiri opened this issue Aug 9, 2018 · 1 comment
Closed

Dosen't work with storybook/html #1

neginbasiri opened this issue Aug 9, 2018 · 1 comment

Comments

@neginbasiri
Copy link

neginbasiri commented Aug 9, 2018

My story .js file

import { storiesOf } from '@storybook/html';
import { withThemesProvider } from 'storybook-addon-styled-component-theme';
import header from '../../templates/partials/header.html';
import '../../styles/partials/index.scss';

const defaultTheme = {
	name: 'Green',
	backgroundColor: 'green',
	textColor: 'white'
};

const darkTheme = {
	name: 'Red',
	backgroundColor: 'red',
	textColor: 'white'
};

const getAllThemes = () => [defaultTheme, darkTheme];

storiesOf('Simple Header', module)
	.addDecorator(withThemesProvider(getAllThemes()))
	.add('Header', () => header);

My addons.js

import 'storybook-addon-styled-component-theme/dist/register';

Error

ERROR in ./node_modules/storybook-addon-styled-component-theme/dist/ThemesProvider.js Module not found: Error: Can't resolve 'styled-components' in 'C:\Projects\LCA\UI\node_modules\storybook-addon-styled-component-theme\dist'

Versions:

"@storybook/html": "^4.0.0-alpha.16",
"storybook-addon-styled-component-theme": "^1.0.3",

@echoulen
Copy link
Owner

echoulen commented Aug 11, 2018

peer dependencies are
@storybook/addons
react
styled-components

yarn install by yourself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants