mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 06:28:33 +00:00
31 lines
776 B
JavaScript
31 lines
776 B
JavaScript
import React from 'react';
|
|
import Portal from 'components/Portal/index';
|
|
import Modal from 'components/Modal/index';
|
|
import StyledWrapper from './StyledWrapper';
|
|
|
|
const DeleteDotEnvFile = ({ onClose, onConfirm, filename = '.env' }) => {
|
|
const handleConfirm = () => {
|
|
onConfirm();
|
|
onClose();
|
|
};
|
|
|
|
return (
|
|
<Portal>
|
|
<StyledWrapper>
|
|
<Modal
|
|
size="sm"
|
|
title={`Delete ${filename} File`}
|
|
confirmText="Delete"
|
|
handleConfirm={handleConfirm}
|
|
handleCancel={onClose}
|
|
confirmButtonColor="danger"
|
|
>
|
|
Are you sure you want to delete <span className="font-medium">{filename}</span> file?
|
|
</Modal>
|
|
</StyledWrapper>
|
|
</Portal>
|
|
);
|
|
};
|
|
|
|
export default DeleteDotEnvFile;
|