Skip to content

Commit

Permalink
chore: Upgrades Storybook to version 6.3.8 to make it compatible with…
Browse files Browse the repository at this point in the history
… Webpack 5 (apache#16857)
  • Loading branch information
michael-s-molina authored Sep 27, 2021
1 parent 6daf37b commit 27a40d2
Show file tree
Hide file tree
Showing 4 changed files with 9,394 additions and 12,540 deletions.
6 changes: 4 additions & 2 deletions superset-frontend/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ const path = require('path');
const customConfig = require('../webpack.config.js');

module.exports = {
core: {
builder: 'webpack5',
},
stories: ['../src/@(components|common|filters)/**/*.stories.@(t|j)sx'],
addons: [
'@storybook/addon-essentials',
'@storybook/addon-links',
'@storybook/preset-typescript',
'storybook-addon-jsx',
'@storybook/addon-knobs/register',
'@storybook/addon-knobs',
'storybook-addon-paddings',
],
webpackFinal: config => ({
Expand Down
19 changes: 11 additions & 8 deletions superset-frontend/.storybook/preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import React from 'react';
import { addDecorator } from '@storybook/react';
import { jsxDecorator } from 'storybook-addon-jsx';
import { addParameters } from '@storybook/react';
import { withPaddings } from 'storybook-addon-paddings';
import WithPaddings from 'storybook-addon-paddings';
import { supersetTheme, ThemeProvider } from '@superset-ui/core';
import { combineReducers, createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
Expand Down Expand Up @@ -49,15 +49,18 @@ const providerDecorator = Story => (
addDecorator(jsxDecorator);
addDecorator(themeDecorator);
addDecorator(providerDecorator);
addDecorator(withPaddings);
addDecorator(WithPaddings);

addParameters({
paddings: [
{ name: 'None', value: '0px' },
{ name: 'Small', value: '16px' },
{ name: 'Medium', value: '32px', default: true },
{ name: 'Large', value: '64px' },
],
paddings: {
values: [
{ name: 'None', value: '0px' },
{ name: 'Small', value: '16px' },
{ name: 'Medium', value: '32px' },
{ name: 'Large', value: '64px' },
],
default: 'Medium',
},
options: {
storySort: {
method: 'alphabetical',
Expand Down
Loading

0 comments on commit 27a40d2

Please sign in to comment.