Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {withKnobs} from '@storybook/addon-knobs';
import {Provider as StyletronProvider} from 'styletron-react';
import {Client as Styletron} from 'styletron-engine-atomic';
import loadStories from '../.storybook-base/loadStories.js';
import {ThemeProvider} from '../src/styles';
import {LightThemeMove} from '../src/themes';
withOptions({
name: 'baseui',
url: 'https://github.com/uber-web/baseui',
});
setOptions({
theme: {
...themes.normal,
highlightColor: LightThemeMove.colors.primary,
successColor: LightThemeMove.colors.positive,
warningColor: LightThemeMove.colors.warning,
failColor: LightThemeMove.colors.negative,
},
});
const engine = new Styletron();
// this should be first decorator to avoid extra code to be parsed here
addDecorator(withInfo);
addDecorator(withKnobs);
addDecorator(checkA11y);
// Add providers for theme and styletron
import React from 'react';
import ThemeProvider from '@emotion/provider';
import { configure, addDecorator } from '@storybook/react';
import { themes } from '@storybook/components';
import { withOptions } from '@storybook/addon-options';
import { setConsoleOptions } from '../src';
import 'react-chromatic/storybook-addon';
const theme = {...themes.normal,
// mainBackground: '#4c4c4c',
// mainFill: '#ababab',
// barFill: '#4c4c4c',
// barSelectedColor: 'white',
// highlightColor: 'red'
// mainTextColor: 'white'
brand: {
background: '#F1618C',
color: 'white'
}
}
addDecorator(
withOptions({
name: 'Addon Console',
url: 'https://github.com/storybooks/storybook-addon-console',
{
stories: [],
storiesHash: {},
selectedId: null,
shortcutOptions: {
full: false,
nav: true,
panel: 'right',
enableShortcuts: true,
},
uiOptions: {
name: 'STORYBOOK',
url: 'https://github.com/storybooks/storybook',
sortStoriesByKind: false,
sidebarAnimations: true,
theme: themes.normal,
},
customQueryParams: {},
notifications: [
{
id: 'update',
level: 2,
link: '/settings/about',
icon: '🎉',
content: `There's a new version available: 4.0.0`,
},
],
selectedPanelValue: null,
get selectedPanel() {
return ensurePanel(this.panels, this.selectedPanelValue, this.selectedPanelValue);