From e4c925ad756ce216dc8441390634499dde906289 Mon Sep 17 00:00:00 2001 From: Jeff Sieu Date: Sat, 8 Oct 2022 18:25:05 +0800 Subject: [PATCH] [questions][ui] use TIH dialog for discard --- .../questions/DiscardDraftDialog.tsx | 84 ++++--------------- 1 file changed, 16 insertions(+), 68 deletions(-) diff --git a/apps/portal/src/components/questions/DiscardDraftDialog.tsx b/apps/portal/src/components/questions/DiscardDraftDialog.tsx index a0921cfa..85b56c4d 100644 --- a/apps/portal/src/components/questions/DiscardDraftDialog.tsx +++ b/apps/portal/src/components/questions/DiscardDraftDialog.tsx @@ -1,6 +1,4 @@ -import { Fragment } from 'react'; -import { Dialog, Transition } from '@headlessui/react'; -import { ExclamationTriangleIcon } from '@heroicons/react/24/outline'; +import { Button, Dialog } from '@tih/ui'; export type DiscardDraftDialogProps = { onCancel: () => void; @@ -13,70 +11,20 @@ export default function DiscardDraftDialog({ onDiscard, }: DiscardDraftDialogProps) { return ( - - - -
- - -
-
- - -
-
-
-
- - Discard Question Draft - -
-

- Are you sure you want to discard the current draft? This - action cannot be undone. -

-
-
-
-
- - -
-
-
-
-
-
-
+ + } + secondaryButton={ + ); }