Skip to content

Commit

Permalink
Import fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SnakOleg committed Dec 17, 2024
1 parent 4cc4fd4 commit 7da8630
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect } from "preact/hooks";
import styles from "./Modal.module.css";
import { Button } from "@components/base/buttons/Button";
import { JSX } from "react";
import { JSX } from "preact";

interface ModalProps {
title: string;
Expand All @@ -19,12 +19,12 @@ export const Modal = ({ title, description, onClose, actionButtons = [], icon }:
}
};
window.addEventListener("keydown", handleKeyDown);
return () => window.removeEventListener("keydown", handleKeyDown);
return () => { window.removeEventListener("keydown", handleKeyDown); };
}, [onClose]);

return (
<div className={`${styles["overlay"]} ${styles["visible"]}`} onClick={onClose}>
<div className={styles["modal"]} onClick={(e) => e.stopPropagation()}>
<div className={styles["modal"]} onClick={(e) => { e.stopPropagation() }}>
<h2 className={styles["title"]}>{title}</h2>
<div className={styles["description"]}>
<span>{description}</span>
Expand Down

0 comments on commit 7da8630

Please sign in to comment.