signal-desktop/ts/components/DialogExpiredBuild.stories.tsx

39 lines
1.1 KiB
TypeScript
Raw Normal View History

// Copyright 2020-2021 Signal Messenger, LLC
2020-10-30 20:34:04 +00:00
// SPDX-License-Identifier: AGPL-3.0-only
import * as React from 'react';
2020-09-12 00:46:52 +00:00
import { storiesOf } from '@storybook/react';
import { boolean, select } from '@storybook/addon-knobs';
import { DialogExpiredBuild } from './DialogExpiredBuild';
2021-09-18 00:30:08 +00:00
import { setupI18n } from '../util/setupI18n';
import enMessages from '../../_locales/en/messages.json';
import { WidthBreakpoint } from './_util';
import { FakeLeftPaneContainer } from '../test-both/helpers/FakeLeftPaneContainer';
const i18n = setupI18n('en', enMessages);
storiesOf('Components/DialogExpiredBuild', module).add(
'DialogExpiredBuild',
() => {
const containerWidthBreakpoint = select(
'containerWidthBreakpoint',
WidthBreakpoint,
WidthBreakpoint.Wide
);
const hasExpired = boolean('hasExpired', true);
return (
<FakeLeftPaneContainer
containerWidthBreakpoint={containerWidthBreakpoint}
>
<DialogExpiredBuild
containerWidthBreakpoint={containerWidthBreakpoint}
hasExpired={hasExpired}
i18n={i18n}
/>
</FakeLeftPaneContainer>
);
}
);