From 4c79aadc224d3c799fca29bf6fdbed32a17fb4a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Victor?= <68869379+JoaoVictor6@users.noreply.github.com> Date: Thu, 5 Jan 2023 22:34:18 -0300 Subject: [PATCH] feat: create dialog and button for confirm delete --- .../components/basic/dialog/DeleteEnvVar.tsx | 78 +++++++++++++++++++ .../dashboard/DeleteActionButton.tsx | 33 ++++++++ 2 files changed, 111 insertions(+) create mode 100644 frontend/components/basic/dialog/DeleteEnvVar.tsx create mode 100644 frontend/components/dashboard/DeleteActionButton.tsx 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 ( +