Add more info to settings

This commit is contained in:
Gregory Schier
2024-02-17 11:04:19 -08:00
parent fde0c5540b
commit 870cb25980
14 changed files with 53 additions and 28 deletions

View File

@@ -2,7 +2,7 @@ import classNames from 'classnames';
import { motion } from 'framer-motion';
import type { ReactNode } from 'react';
import { useMemo } from 'react';
import { useKeyPressEvent } from 'react-use';
import { useHotKey } from '../../hooks/useHotKey';
import { Overlay } from '../Overlay';
import { Heading } from './Heading';
import { IconButton } from './IconButton';
@@ -34,10 +34,7 @@ export function Dialog({
[description],
);
useKeyPressEvent('Escape', (e) => {
e.preventDefault();
onClose();
});
useHotKey('popup.close', onClose);
return (
<Overlay open={open} onClose={onClose} portalName="dialog">

View File

@@ -237,7 +237,7 @@ const Menu = forwardRef<Omit<DropdownRef, 'open' | 'isOpen' | 'toggle'>, MenuPro
[handleClose],
);
useHotKey('dropdown.close', handleClose);
useHotKey('popup.close', handleClose);
const handlePrev = useCallback(() => {
setSelectedIndex((currIndex) => {