diff --git a/src/components/dialogs/EmailDialog/index.tsx b/src/components/dialogs/EmailDialog/index.tsx new file mode 100644 index 0000000000..bec06e7040 --- /dev/null +++ b/src/components/dialogs/EmailDialog/index.tsx @@ -0,0 +1,35 @@ +import {msg, Trans} from '@lingui/macro' +import {useLingui} from '@lingui/react' + +import * as Dialog from '#/components/Dialog' +import {Text} from '#/components/Typography' + +export {useDialogControl} from '#/components/Dialog' + +export function EmailDialog({ + control, +}: { + control: Dialog.DialogControlProps +}) { + const {_} = useLingui() + + return ( + + + + + + + + ) +} + +function Inner({ + control, +}: { + control: Dialog.DialogControlProps +}) { + return ( + Hello + ) +} diff --git a/src/components/dialogs/EmailDialog/types.ts b/src/components/dialogs/EmailDialog/types.ts new file mode 100644 index 0000000000..9c5f6c573c --- /dev/null +++ b/src/components/dialogs/EmailDialog/types.ts @@ -0,0 +1,35 @@ +import {type ReactNode} from 'react' + +import {type DialogControlProps} from '#/components/Dialog' + +export type EmailDialogProps = { + control: DialogControlProps +} + +export type EmailDialogInnerProps = EmailDialogProps & {} + +export type Screen = { + id: ScreenID.ChangeEmail +} | { + id: ScreenID.EnterCode + /** + * - email was sent earlier + * - email was _just_ sent + */ + instructions: ReactNode[] +} | { + id: ScreenID.VerifyEmail + /** + * - default flow + * - new user blockers (x5) + */ + instructions: ReactNode[] + // onCloseWithoutVerifying, + // onCloseAfterVerifying, +} + +export enum ScreenID { + ChangeEmail = 'ChangeEmail', // normal, instructs to click link first + EnterCode = 'EnterCode', // if user elects to enter a code + VerifyEmail = 'VerifyEmail', // as a separate step, instructs to click link first +}