Skip to content

Commit

Permalink
Merge c1a37fc into 44c1bf4
Browse files Browse the repository at this point in the history
  • Loading branch information
DiyanDimitrov committed Nov 24, 2021
2 parents 44c1bf4 + c1a37fc commit 94f74e9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
const postCSS = require('rollup-plugin-postcss');

module.exports = {
stories: ['../dist/stories/**/*.stories.{js,md,mdx}'],

rollupConfig(config) {
config.plugins.push(postCSS({ include: ['**/*.scss'], inject: false }));

return config;
}
};
10 changes: 8 additions & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,16 @@ const getTheme = (themeName) => {

const themeProvider = (Story, context) => {
const theme = getTheme(context.globals.theme);
return html`

// Workaround for https://github.com/cfware/babel-plugin-template-html-minifier/issues/56
const htmlNoMin = html;
const styles = htmlNoMin`
<style>
${theme.default}
</style>
</style>`;

return htmlNoMin`
${styles}
${Story()}
`;
};
Expand Down

0 comments on commit 94f74e9

Please sign in to comment.