Upgrade react and storybook
This commit is contained in:
parent
6476a4fe73
commit
42eb4013d0
244 changed files with 15341 additions and 10249 deletions
|
@ -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)',
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue