Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import PropTypes from 'prop-types';
import PropVal from '@storybook/addon-info/dist/components/PropVal';
import { configure, setAddon } from '@storybook/react';
import infoAddon from '@storybook/addon-info';
// temp fix PropVal.propTypes
// https://github.com/storybooks/storybook/issues/1305
PropVal.propTypes = {
...PropVal.propTypes,
maxPropObjectKeys: PropTypes.number,
maxPropArrayLength: PropTypes.number,
maxPropStringLength: PropTypes.number,
};
setAddon(infoAddon);
configure(() => require('./fa5'), module);
autoResolveReq.keys().forEach(autoResolveReq);
}
defaultResolveReq.keys().forEach(defaultResolveReq);
}
chaptersAddonSetDefaults({
sectionOptions: {
useTheme: true, // TODO: Make own distinct theme
showSource: false,
allowSourceToggling: true,
showPropTables: false,
allowPropTablesToggling: true,
},
});
setAddon(chaptersAddon);
addDecorator(withKnobs);
setOptions(addonOptions);
configure(loadStories, module);
import { setAddon, configure, addParameters } from '@storybook/react';
import JSXAddon from 'storybook-addon-jsx';
import './storybook.scss';
import theme from './theme';
addParameters({ options: { theme } });
setAddon(JSXAddon);
// automatically import all files ending in *.stories.js
const req = require.context('../stories', true, /\.stories\.(jsx?|mdx)$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);
it('should validate on default usage', () => {
interface Addon {
test(name: string, story: RenderFunction): Story & T;
}
const TestAddon: Addon = {
test(name, story) {
console.log(this.kind === 'TestAddon');
return this.add(name, story);
},
};
setAddon(TestAddon);
storiesOf('TestAddon', module)
.test('', () => <div>)
.test('', () => <div>)
.add('', () => <div>)
.test('', () => <div>)
.add('', () => <div>, parameters);
});
});</div></div></div></div></div>
import {setAddon} from '@storybook/react';
import JSXAddon from 'storybook-addon-jsx';
setAddon(JSXAddon);
import '../../dist/style.css';
import '../.storybook/storybook.css';
import './areaseries-story';
import './barseries-story';
import './lineseries-story';
import './markseries-story';
import './radial-story';
import './axis-story';
import './legend-story';
import * as storybook from '@storybook/react';
import { setOptions } from '@storybook/addon-options';
import infoAddon from '@storybook/react-addon-info';
import 'storybook-chapters';
storybook.setAddon(infoAddon);
setOptions({
name: 'React Theming',
url: 'https://github.com/sm-react/react-theming',
goFullScreen: false,
showLeftPanel: true,
showDownPanel: true,
showSearchBox: false,
downPanelInRight: false,
});
storybook.configure(
() => {
require('../src/stories');
require('../src/ThemeSwitcher.story');
require('../src/MaterialUI/index.story');
import React from 'react';
import JSXAddon from 'storybook-addon-jsx';
import { storiesOf, setAddon } from '@storybook/react';
import SandpackProvider from '../src/components/SandpackProvider/index.ts';
import OpenInCodeSandbox from '../src/components/OpenInCodeSandbox/index.ts';
setAddon(JSXAddon);
const stories = storiesOf('Export To CodeSandbox', module);
stories.addWithJSX('minimal', () => (
));
{
name: 'Twitter',
value: '#00aced',
},
{
name: 'Facebook',
value: '#3b5998',
},
],
options: {
showAddonPanel: true,
theme: customTheme,
},
});
setAddon(JSXAddon);
const req = require.context('../stories', true, /.stories.tsx$/);
function loadStories() {
require('./welcomeStory');
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);
import React from 'react';
import {setAddon, storiesOf} from '@storybook/react';
import JSXAddon from 'storybook-addon-jsx';
setAddon(JSXAddon);
import {
withKnobs,
color,
number,
object,
text
} from '@storybook/addon-knobs/react';
import {HorizontalBarSeries, VerticalBarSeries} from 'react-vis';
import {generateLinearData, intRandom, random} from './storybook-data.js';
import {
chooseColorScale,
SimpleChartWrapper,
jsxOptions
} from './storybook-utils.js';
import { configure } from '@storybook/react';
import { setAddon, addDecorator } from '@storybook/react';
import JSXAddon from 'storybook-addon-jsx';
import { withKnobs } from '@storybook/addon-knobs/react';
addDecorator(withKnobs);
setAddon(JSXAddon);
const req = require.context('../src', true, /.stories.tsx$/);
function loadStories() {
require('./welcomeStory');
req.keys().forEach(filename => req(filename));
}
configure(loadStories, module);