1 import { c } from 'ttag';
3 import { Button } from '@proton/atoms';
4 import type { ModalStateProps } from '@proton/components/components/modalTwo/useModalState';
5 import Prompt from '@proton/components/components/prompt/Prompt';
6 import useLoading from '@proton/hooks/useLoading';
11 children: React.ReactNode;
12 onConfirm: () => Promise<void>;
15 const GroupItemActionPrompt = ({
23 }: Props & ModalStateProps) => {
24 const [loading, withLoading] = useLoading();
35 withLoading(onConfirm().then(() => onClose()));
41 <Button onClick={onClose}>{c('Action').t`Cancel`}</Button>,
45 <p className="m-0">{children}</p>
50 export default GroupItemActionPrompt;