diff --git a/frontend/components/basic/dialog/DeleteEnvVar.tsx b/frontend/components/basic/dialog/DeleteEnvVar.tsx new file mode 100644 index 000000000..14f5fde47 --- /dev/null +++ b/frontend/components/basic/dialog/DeleteEnvVar.tsx @@ -0,0 +1,78 @@ +import { Fragment } from "react"; +import { useTranslation } from "react-i18next"; +import { Dialog, Transition } from "@headlessui/react"; + +// #TODO: USE THIS. Currently it's not. Kinda complicated to set up because of state. + +type Props = { + isOpen: boolean + onClose: () => void + onSubmit: () => void +} + +export const DeleteEnvVar = ({ isOpen, onClose, onSubmit }: Props) => { + const { t } = useTranslation() + return ( +
+ + {}}> + +
+ +
+ +
+ + + + {t('dashboard:sidebar.delete-key-dialog.title')} + +
+

+ {t('dashboard:sidebar.delete-key-dialog.confirm-delete-message')} +

+
+
+ + +
+
+
+
+
+
+
+
+ ); +}; diff --git a/frontend/components/dashboard/DeleteActionButton.tsx b/frontend/components/dashboard/DeleteActionButton.tsx new file mode 100644 index 000000000..db595ff03 --- /dev/null +++ b/frontend/components/dashboard/DeleteActionButton.tsx @@ -0,0 +1,33 @@ +import React, { useState } from 'react' +import { useTranslation } from 'react-i18next'; + +import Button from '../basic/buttons/Button'; +import { DeleteEnvVar } from '../basic/dialog/DeleteEnvVar'; + +type Props = { + onSubmit: () => void +} + +export function DeleteActionButton({ onSubmit }: Props) { + const { t } = useTranslation(); + const [open, setOpen] = useState(false) + + return ( +
+
+ ) +}