🚸 (help): Close popup when clicking in the background

This commit is contained in:
2024-02-12 19:26:43 +01:00
parent 8a669324c9
commit f15d3d2c17
2 changed files with 10 additions and 2 deletions
+8 -2
View File
@@ -9,8 +9,14 @@ import './styles.scss';
const Help = ({ onClose }: { onClose: () => void }) => {
return (
<div className='helpContainer'>
<div className='helpPopup'>
<div
className='helpContainer'
onClick={onClose}
>
<div
className='helpPopup'
onClick={(ev) => ev.stopPropagation()}
>
<div className='header'>
<p className='title'>Comment jouer ?</p>
<button
+2
View File
@@ -8,6 +8,7 @@
height: 100svh;
background-color: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(7px);
cursor: pointer;
& > .helpPopup {
display: flex;
@@ -17,6 +18,7 @@
border-radius: 5px;
background-color: #ffeee5;
color: #f39440;
cursor: default;
& > .header {
display: grid;