Upgrade react and storybook

This commit is contained in:
Josh Perez 2022-06-06 20:48:02 -04:00 committed by GitHub
parent 6476a4fe73
commit 42eb4013d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
244 changed files with 15341 additions and 10249 deletions

View file

@ -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} />;
});
};