🚸 (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 }) => { const Help = ({ onClose }: { onClose: () => void }) => {
return ( return (
<div className='helpContainer'> <div
<div className='helpPopup'> className='helpContainer'
onClick={onClose}
>
<div
className='helpPopup'
onClick={(ev) => ev.stopPropagation()}
>
<div className='header'> <div className='header'>
<p className='title'>Comment jouer ?</p> <p className='title'>Comment jouer ?</p>
<button <button
+2
View File
@@ -8,6 +8,7 @@
height: 100svh; height: 100svh;
background-color: rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(7px); backdrop-filter: blur(7px);
cursor: pointer;
& > .helpPopup { & > .helpPopup {
display: flex; display: flex;
@@ -17,6 +18,7 @@
border-radius: 5px; border-radius: 5px;
background-color: #ffeee5; background-color: #ffeee5;
color: #f39440; color: #f39440;
cursor: default;
& > .header { & > .header {
display: grid; display: grid;