1 import { c } from 'ttag';
3 import { Button } from '@proton/atoms';
4 import type { PromptProps } from '@proton/components/components/prompt/Prompt';
5 import Prompt from '@proton/components/components/prompt/Prompt';
6 import getBoldFormattedText from '@proton/components/helpers/getBoldFormattedText';
7 import useLoading from '@proton/hooks/useLoading';
9 interface Props extends Omit<PromptProps, 'title' | 'buttons' | 'children'> {
10 onResend: () => Promise<void>;
14 const ResendInvitePrompt = ({ onClose, onResend, email, ...rest }: Props) => {
15 const [loading, withLoading] = useLoading();
18 title={c('Title').t`Send new invite?`}
24 withLoading(onResend()).then(onClose);
26 >{c('Action').t`Send new invite`}</Button>,
27 <Button onClick={onClose}>{c('Action').t`Cancel`}</Button>,
32 <p className="text-break">
33 {getBoldFormattedText(c('Info').t`This will send a new invite to **${email}**.`)}
39 export default ResendInvitePrompt;