import * as React from 'react'; import * as styles from './ConfirmDialog.scss'; import { useI18n } from '../util/i18n'; export type Props = { readonly title: string; readonly children: React.ReactNode; readonly confirm: string; readonly onConfirm: () => unknown; readonly cancel?: string; readonly onCancel: () => unknown; }; export const ConfirmDialog = ({ title, children, confirm, cancel, onConfirm, onCancel, }: Props) => { const i18n = useI18n(); const cancelText = cancel || i18n('StickerCreator--ConfirmDialog--cancel'); return (

{title}

{children}

); };