diff --git a/frontend/src/components/modals/ThemeModal.tsx b/frontend/src/components/modals/ThemeModal.tsx index 62901e7..5b50979 100644 --- a/frontend/src/components/modals/ThemeModal.tsx +++ b/frontend/src/components/modals/ThemeModal.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react' +import { useRef, useState, type KeyboardEvent } from 'react' import { toast } from 'sonner' import { Check } from 'lucide-react' import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog' @@ -14,17 +14,21 @@ interface ThemeCardProps { themeId: ThemeId selected: boolean onClick: () => void + onKeyDown?: (event: KeyboardEvent) => void + buttonRef?: (element: HTMLButtonElement | null) => void } -function ThemeCard({ themeId, selected, onClick }: ThemeCardProps) { +function ThemeCard({ themeId, selected, onClick, onKeyDown, buttonRef }: ThemeCardProps) { const preset = THEMES[themeId] const c = preset.colors return (