2023-11-07 06:35:05 +03:00
|
|
|
import { StoryFn, Meta } from '@storybook/react';
|
2022-09-07 10:00:28 +03:00
|
|
|
import { FollowModal } from './FollowModal';
|
2022-09-03 21:38:52 +03:00
|
|
|
import FollowModalMock from '../../../stories/assets/mocks/follow-modal.png';
|
2022-04-28 09:19:20 +03:00
|
|
|
|
|
|
|
const Example = () => (
|
|
|
|
<div>
|
2022-08-23 04:29:37 +03:00
|
|
|
<FollowModal handleClose={null} account="@fake@server.name" name="Fake Owncast Server" />
|
2022-04-28 09:19:20 +03:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
2023-11-07 06:35:05 +03:00
|
|
|
const meta = {
|
2022-04-28 09:19:20 +03:00
|
|
|
title: 'owncast/Modals/Follow',
|
|
|
|
component: FollowModal,
|
2022-05-13 06:52:19 +03:00
|
|
|
parameters: {
|
|
|
|
design: {
|
|
|
|
type: 'image',
|
|
|
|
url: FollowModalMock,
|
|
|
|
scale: 0.5,
|
|
|
|
},
|
|
|
|
docs: {
|
|
|
|
description: {
|
|
|
|
component: `The Follow modal allows an end user to type in their Fediverse account information to follow this Owncast instance. It must:
|
2022-08-23 04:29:37 +03:00
|
|
|
|
2022-05-13 06:52:19 +03:00
|
|
|
- Validate the input to make sure it's a valid looking account.
|
|
|
|
- Handle errors that come back from the server.
|
|
|
|
- Perform the redirect to the remote server when the backend response is received.
|
|
|
|
`,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-11-07 06:35:05 +03:00
|
|
|
} satisfies Meta<typeof FollowModal>;
|
2022-04-28 09:19:20 +03:00
|
|
|
|
2023-11-07 06:35:05 +03:00
|
|
|
export default meta;
|
2022-04-28 09:19:20 +03:00
|
|
|
|
2023-11-07 06:35:05 +03:00
|
|
|
const Template: StoryFn<typeof FollowModal> = () => <Example />;
|
|
|
|
|
|
|
|
export const Basic = {
|
|
|
|
render: Template,
|
|
|
|
};
|