From fa7ad9b05ca04e2ea7d8d0b82f1ac2beb585096f Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 10 Jun 2026 20:06:40 +0530 Subject: [PATCH] fix: add keyboard navigation for tabs + switch - ArrowLeft/ArrowRight navigation for framework tab groups - Roving tabindex (tabIndex=0 on active, -1 on rest) - Space/Enter activation for theme toggle switch - Shared useCallback handlers to minimize allocations --- src/App.tsx | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 3e552dd5..c680f141 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import React, { useState, useMemo, useEffect } from 'react'; +import React, { useState, useMemo, useEffect, useCallback } from 'react'; import { Search, Copy, @@ -19,8 +19,6 @@ import { Heart, Code, Layers, - ArrowRight, - ChevronRight, X } from 'lucide-react'; import { CATEGORIES, ALL_COMPONENTS as COMPONENTS } from './data/components'; @@ -236,6 +234,8 @@ export default function App() {