import { useEffect } from "react";
import { useKeyPress } from "../../utils/index.js";
const HandleEsc = ({ onPress }) => {
    const pressed = useKeyPress("Escape");
    useEffect(() => {
        if (pressed) {
            onPress();
        }
    }, [pressed, onPress]);
    return null;
};
export { HandleEsc };
//# sourceMappingURL=HandleEsc.js.map