From 8fc56f011bf5d3377d21eaf74d8a51f6a934bbf2 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 17 Jan 2022 23:41:46 +0100 Subject: [PATCH] Added x button to modal dialogs Issue #20 --- src/components/modals/AboutModal.tsx | 7 +++++++ src/components/modals/InfoModal.tsx | 7 +++++++ src/components/modals/WinModal.tsx | 9 ++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/components/modals/AboutModal.tsx b/src/components/modals/AboutModal.tsx index 2ed1dbc8c1..025c09e0fc 100644 --- a/src/components/modals/AboutModal.tsx +++ b/src/components/modals/AboutModal.tsx @@ -1,5 +1,6 @@ import { Fragment } from 'react' import { Dialog, Transition } from '@headlessui/react' +import { XCircleIcon } from '@heroicons/react/outline' type Props = { isOpen: boolean @@ -44,6 +45,12 @@ export const AboutModal = ({ isOpen, handleClose }: Props) => { leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" >
+
+ handleClose()} + /> +
{ leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" >
+
+ handleClose()} + /> +
- + {/* This element is to trick the browser into centering the modal contents. */}
+
+ handleClose()} + /> +