feat: environment configuration (resolves #8)

This commit is contained in:
Anusree Subash
2022-10-16 01:15:36 +05:30
parent 008704c4e1
commit 4a5378a2e1
12 changed files with 355 additions and 8 deletions

View File

@@ -18,10 +18,14 @@ const ModalContent = ({children}) => (
</div>
);
const ModalFooter = ({confirmText, cancelText, handleSubmit, handleCancel, confirmDisabled, hideCancel}) => {
const ModalFooter = ({confirmText, cancelText, handleSubmit, handleCancel, confirmDisabled, hideCancel, hideFooter}) => {
confirmText = confirmText || 'Save';
cancelText = cancelText || 'Cancel';
if (hideFooter) {
return null;
}
return (
<div className="flex justify-end p-4 bruno-modal-footer">
<span className={hideCancel ? "hidden" : "mr-2"}>
@@ -47,7 +51,8 @@ const Modal = ({
handleConfirm,
children,
confirmDisabled,
hideCancel
hideCancel,
hideFooter
}) => {
const [isClosing, setIsClosing] = useState(false);
const escFunction = (event) => {
@@ -86,6 +91,7 @@ const Modal = ({
handleSubmit={handleConfirm}
confirmDisabled={confirmDisabled}
hideCancel={hideCancel}
hideFooter={hideFooter}
/>
</div>
<div className="bruno-modal-backdrop" onClick={() => closeModal()} />