/home/vianto5/heredit.mx/wp-content/plugins/code-snippets/js/components/common
Edit: /home/vianto5/heredit.mx/wp-content/plugins/code-snippets/js/components/common/ConfirmDialog.tsx (1059B)
import React from 'react'
import { __ } from '@wordpress/i18n'
import { Button, Flex, Modal } from '@wordpress/components'
import type { ReactNode } from 'react'
export interface ConfirmDialogProps {
open?: boolean
title: string
onConfirm?: VoidFunction
onCancel: VoidFunction
confirmLabel?: string
cancelLabel?: string
children?: ReactNode,
confirmButtonClassName?: string
}
export const ConfirmDialog: React.FC
= ({
open,
title,
onConfirm,
onCancel,
children,
confirmLabel = __('OK', 'code-snippets'),
cancelLabel = __('Cancel', 'code-snippets'),
confirmButtonClassName
}) =>
open
?
{children}
: null