Updated the Dialog.jsx component
This commit is contained in:
parent
27aec7ebd3
commit
fd55556741
@ -4,13 +4,13 @@ import {faGear, faXmark} from "@fortawesome/free-solid-svg-icons";
|
|||||||
import {useContext} from "react";
|
import {useContext} from "react";
|
||||||
import {SettingsContext} from "@/common/contexts/SettingsProvider.jsx";
|
import {SettingsContext} from "@/common/contexts/SettingsProvider.jsx";
|
||||||
|
|
||||||
export const Dialog = ({onClose}) => {
|
export const Dialog = ({onClose, open}) => {
|
||||||
|
|
||||||
const {rounds, updateRounds} = useContext(SettingsContext);
|
const {rounds, updateRounds} = useContext(SettingsContext);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="glassy dialog">
|
<div className={"glassy dialog" + (open ? "" : " dialog-closed")}>
|
||||||
<div className="dialog-header">
|
<div className="dialog-header">
|
||||||
<div className="dialog-title">
|
<div className="dialog-title">
|
||||||
<FontAwesomeIcon icon={faGear} />
|
<FontAwesomeIcon icon={faGear} />
|
||||||
@ -28,7 +28,7 @@ export const Dialog = ({onClose}) => {
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="dialog-overlay" onClick={onClose} />
|
{open && <div className="dialog-overlay" onClick={onClose} />}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user