signal-desktop/ts/components/conversation/UniversalTimerNotification.stories.tsx

52 lines
1.2 KiB
TypeScript
Raw Normal View History

2021-06-01 20:45:43 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React from 'react';
import { UniversalTimerNotification } from './UniversalTimerNotification';
2021-09-18 00:30:08 +00:00
import { setupI18n } from '../../util/setupI18n';
2021-06-01 20:45:43 +00:00
import enMessages from '../../../_locales/en/messages.json';
import { EXPIRE_TIMERS } from '../../test-both/util/expireTimers';
2022-06-07 00:48:02 +00:00
export default {
title: 'Components/UniversalTimerNotification',
};
2021-06-01 20:45:43 +00:00
const i18n = setupI18n('en', enMessages);
2022-06-07 00:48:02 +00:00
export const Seconds = (): JSX.Element => (
<UniversalTimerNotification
i18n={i18n}
expireTimer={EXPIRE_TIMERS[0].value / 1000}
/>
);
export const Minutes = (): JSX.Element => (
<UniversalTimerNotification
i18n={i18n}
expireTimer={EXPIRE_TIMERS[1].value / 1000}
/>
);
export const Hours = (): JSX.Element => (
<UniversalTimerNotification
i18n={i18n}
expireTimer={EXPIRE_TIMERS[2].value / 1000}
/>
);
export const Days = (): JSX.Element => (
<UniversalTimerNotification
i18n={i18n}
expireTimer={EXPIRE_TIMERS[3].value / 1000}
/>
);
export const Weeks = (): JSX.Element => (
<UniversalTimerNotification
i18n={i18n}
expireTimer={EXPIRE_TIMERS[4].value / 1000}
/>
);