1 import type { FC, ReactNode } from 'react';
3 import { c } from 'ttag';
5 import { Button } from '@proton/atoms';
6 import { Prompt } from '@proton/components';
8 import './ConfirmationPrompt.scss';
10 export type ConfirmationPromptHandles = {
12 onConfirm: () => void;
15 type Props = ConfirmationPromptHandles & {
22 export const ConfirmationPrompt: FC<Props> = ({ confirmText, danger, message, title, onCancel, onConfirm }) => {
26 className="pass-prompt"
27 title={<span className="text-break">{title}</span>}
29 <Button onClick={onConfirm} color={danger ? 'danger' : 'norm'} pill>
30 {confirmText ?? c('Action').t`Confirm`}
32 <Button onClick={onCancel} shape="outline" color="norm" pill>
33 {c('Action').t`Cancel`}