2023-02-13 18:51:41 +00:00
|
|
|
// Copyright 2023 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import React from 'react';
|
2023-10-11 19:06:43 +00:00
|
|
|
import type { Meta, StoryFn } from '@storybook/react';
|
2023-02-13 18:51:41 +00:00
|
|
|
|
2023-10-11 19:06:43 +00:00
|
|
|
import { action } from '@storybook/addon-actions';
|
2023-02-13 18:51:41 +00:00
|
|
|
import enMessages from '../../_locales/en/messages.json';
|
|
|
|
import { setupI18n } from '../util/setupI18n';
|
|
|
|
|
2024-01-29 20:09:54 +00:00
|
|
|
import type { PropsType } from './UsernameOnboardingModal';
|
|
|
|
import { UsernameOnboardingModal } from './UsernameOnboardingModal';
|
2023-02-13 18:51:41 +00:00
|
|
|
|
|
|
|
const i18n = setupI18n('en', enMessages);
|
|
|
|
|
|
|
|
export default {
|
2024-01-29 20:09:54 +00:00
|
|
|
component: UsernameOnboardingModal,
|
|
|
|
title: 'Components/UsernameOnboardingModal',
|
2023-10-11 19:06:43 +00:00
|
|
|
args: {
|
|
|
|
i18n,
|
|
|
|
onNext: action('onNext'),
|
2024-01-29 20:09:54 +00:00
|
|
|
onSkip: action('onSkip'),
|
|
|
|
onClose: action('onClose'),
|
2023-02-13 18:51:41 +00:00
|
|
|
},
|
2023-10-11 19:06:43 +00:00
|
|
|
} satisfies Meta<PropsType>;
|
2023-02-13 18:51:41 +00:00
|
|
|
|
|
|
|
// eslint-disable-next-line react/function-component-definition
|
2023-10-11 19:06:43 +00:00
|
|
|
const Template: StoryFn<PropsType> = args => {
|
2024-01-29 20:09:54 +00:00
|
|
|
return <UsernameOnboardingModal {...args} />;
|
2023-02-13 18:51:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const Normal = Template.bind({});
|