/** * @flow * @file Content Explorer Delete Confirmation Dialog * @author Box */ import React from 'react'; import Modal from 'react-modal'; import { injectIntl, FormattedMessage } from 'react-intl'; import PrimaryButton from '../../components/primary-button/PrimaryButton'; import Button from '../../components/button/Button'; import messages from '../common/messages'; import { CLASS_MODAL_CONTENT, CLASS_MODAL_OVERLAY, CLASS_MODAL, TYPE_FOLDER } from '../../constants'; type Props = { appElement: HTMLElement, isLoading: boolean, isOpen: boolean, item: BoxItem, onCancel: Function, onDelete: Function, parentElement: HTMLElement, } & InjectIntlProvidedProps; const DeleteConfirmationDialog = ({ isOpen, onDelete, onCancel, item, isLoading, parentElement, appElement, intl, }: Props) => { const message = item.type === TYPE_FOLDER ? messages.deleteDialogFolderText : messages.deleteDialogFileText; return ( parentElement} portalClassName={CLASS_MODAL} >
); }; export default injectIntl(DeleteConfirmationDialog);