Skip to content

Commit

Permalink
fix(storybook): initialize oneui before loading stories
Browse files Browse the repository at this point in the history
Run OneUI.init before loading stories, so css-vars-ponyfill is loadded and styles work in IE11 too
  • Loading branch information
Carlo Bernardini committed May 20, 2019
1 parent 87061b2 commit 0cb5f75
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { configure, addDecorator, addParameters } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import { withConsole } from '@storybook/addon-console';
import OneUI from '@textkernel/oneui';
import OneUITheme from './oneui.theme';

addDecorator(
Expand All @@ -21,4 +22,7 @@ function loadStories() {
require('../stories/index.js');
}

configure(loadStories, module);
OneUI.init().then(() => {
configure(loadStories, module);
});

0 comments on commit 0cb5f75

Please sign in to comment.