diff --git a/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModalwithState.js b/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModalwithState.js deleted file mode 100644 index e64e062da57..00000000000 --- a/studio/components/to-be-cleaned/ModalsDeprecated/ConfirmModalwithState.js +++ /dev/null @@ -1,44 +0,0 @@ -import React, { useState } from 'react' -import { Modal } from 'ui' - -export default function ConfirmModal({ - title, - message, - onConfirm, - onClose, - onAsyncConfirm, - visible, -}) { - const [loading, setLoading] = useState(false) - - function onCancelClick() { - if (!loading) onClose() - } - - async function onConfirmClick() { - if (onAsyncConfirm) { - setLoading(true) - await onAsyncConfirm() - - onClose() - } else if (onConfirm) { - onConfirm() - } - } - - return ( - - ) -} diff --git a/studio/components/to-be-cleaned/ModalsDeprecated/Modal.js b/studio/components/to-be-cleaned/ModalsDeprecated/Modal.js deleted file mode 100644 index e4ea5e741ce..00000000000 --- a/studio/components/to-be-cleaned/ModalsDeprecated/Modal.js +++ /dev/null @@ -1,73 +0,0 @@ -import { Transition } from '@headlessui/react' -import { clickOutsideListener, useKeyboardShortcuts } from 'hooks' - -/** - * Base modal with trigger button and close button - * - * @param {Boolean} open // The parent should hold the open state - * @param {Function} handleCloseEvent // Delegate the close event to the parent - * @param {JSX.Element|JSX.Element[]} children - */ - -export default function Modal({ children, open, handleCloseEvent }) { - const ref = clickOutsideListener(handleCloseEvent) - - useKeyboardShortcuts({ - Escape: handleCloseEvent, - }) - - return ( -
- -
-
-
-
-
-
- -
- -
-
- {children} -
-
-
-
-
-
- ) -}