allow the enter key to apply the currently selected style

This commit is contained in:
findthelorax
2026-04-21 00:00:15 -04:00
committed by Remy
parent da287d459c
commit 18f9bb7bdf
@@ -110,6 +110,12 @@ export function ThemeModal({ open, onClose }: ThemeModalProps) {
}
const handleCardKeyDown = (index: number) => (event: KeyboardEvent<HTMLButtonElement>) => {
if (event.key === 'Enter') {
event.preventDefault()
handleApply()
return
}
if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') return
event.preventDefault()