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

@ -2,13 +2,14 @@
// SPDX-License-Identifier: AGPL-3.0-only
import React, { useState } from 'react';
import { storiesOf } from '@storybook/react';
import { DisappearingTimerSelect } from './DisappearingTimerSelect';
import { setupI18n } from '../util/setupI18n';
import enMessages from '../../_locales/en/messages.json';
const story = storiesOf('Components/DisappearingTimerSelect', module);
export default {
title: 'Components/DisappearingTimerSelect',
};
const i18n = setupI18n('en', enMessages);
@ -28,10 +29,18 @@ const TimerSelectWrap: React.FC<Props> = ({ initialValue }) => {
);
};
story.add('Initial value: 1 day', () => (
export const InitialValue1Day = (): JSX.Element => (
<TimerSelectWrap initialValue={24 * 3600} />
));
);
story.add('Initial value 3 days (Custom time)', () => (
InitialValue1Day.story = {
name: 'Initial value: 1 day',
};
export const InitialValue3DaysCustomTime = (): JSX.Element => (
<TimerSelectWrap initialValue={3 * 24 * 3600} />
));
);
InitialValue3DaysCustomTime.story = {
name: 'Initial value 3 days (Custom time)',
};