refactor(web): move contact modal to component (#1718)

This commit is contained in:
Himself65
2023-03-28 01:07:53 -05:00
committed by GitHub
parent edf7913e12
commit 69b13aa30f
12 changed files with 88 additions and 18 deletions
@@ -0,0 +1,36 @@
import { Button } from '@affine/component';
import type { StoryFn } from '@storybook/react';
import { useState } from 'react';
import type { ContactModalProps } from '../components/contact-modal';
import { ContactModal } from '../components/contact-modal';
export default {
title: 'AFFiNE/ContactModal',
component: ContactModal,
};
export const Basic: StoryFn<ContactModalProps> = args => {
const [open, setOpen] = useState(false);
return (
<>
<Button
onClick={() => {
setOpen(true);
}}
>
Open
</Button>
<ContactModal
{...args}
open={open}
onClose={() => {
setOpen(false);
}}
/>
</>
);
};
Basic.args = {
logoSrc: '/imgs/affine-text-logo.png',
};