Upgrade react and storybook
This commit is contained in:
parent
6476a4fe73
commit
42eb4013d0
244 changed files with 15341 additions and 10249 deletions
|
@ -3,7 +3,6 @@
|
|||
|
||||
import * as React from 'react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { storiesOf } from '@storybook/react';
|
||||
import { boolean, select } from '@storybook/addon-knobs';
|
||||
|
||||
import { setupI18n } from '../util/setupI18n';
|
||||
|
@ -12,7 +11,10 @@ import type { Props } from './ShortcutGuide';
|
|||
import { ShortcutGuide } from './ShortcutGuide';
|
||||
|
||||
const i18n = setupI18n('en', enMessages);
|
||||
const story = storiesOf('Components/ShortcutGuide', module);
|
||||
|
||||
export default {
|
||||
title: 'Components/ShortcutGuide',
|
||||
};
|
||||
|
||||
const createProps = (overrideProps: Partial<Props> = {}): Props => ({
|
||||
i18n,
|
||||
|
@ -31,17 +33,17 @@ const createProps = (overrideProps: Partial<Props> = {}): Props => ({
|
|||
),
|
||||
});
|
||||
|
||||
story.add('Default', () => {
|
||||
export const Default = (): JSX.Element => {
|
||||
const props = createProps({});
|
||||
return <ShortcutGuide {...props} />;
|
||||
});
|
||||
};
|
||||
|
||||
story.add('Mac', () => {
|
||||
export const Mac = (): JSX.Element => {
|
||||
const props = createProps({ platform: 'darwin' });
|
||||
return <ShortcutGuide {...props} />;
|
||||
});
|
||||
};
|
||||
|
||||
story.add('Has Stickers', () => {
|
||||
export const HasStickers = (): JSX.Element => {
|
||||
const props = createProps({ hasInstalledStickers: true });
|
||||
return <ShortcutGuide {...props} />;
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue