From 65fbec3e33aec7c95d999583f58a5ef2108b6e87 Mon Sep 17 00:00:00 2001 From: Bayda77 Date: Mon, 12 Jan 2026 20:19:25 -0600 Subject: [PATCH] Added expand all toggle --- src/pages/Skills.tsx | 74 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 6 deletions(-) diff --git a/src/pages/Skills.tsx b/src/pages/Skills.tsx index 880724c..b5379b8 100644 --- a/src/pages/Skills.tsx +++ b/src/pages/Skills.tsx @@ -124,7 +124,25 @@ const itemVariants: Variants = { }; export default function Skills() { - const [expandedCategory, setExpandedCategory] = useState(null); + const [expandedCategories, setExpandedCategories] = useState([]); + + const toggleCategory = (category: string) => { + setExpandedCategories(prev => + prev.includes(category) + ? prev.filter(c => c !== category) + : [...prev, category] + ); + }; + + const allExpanded = expandedCategories.length === TECHNICAL_SKILLS.length; + + const toggleAll = () => { + if (allExpanded) { + setExpandedCategories([]); + } else { + setExpandedCategories(TECHNICAL_SKILLS.map(c => c.category)); + } + }; return (
@@ -137,9 +155,53 @@ export default function Skills() { style={{ width: "100%", maxWidth: "1200px", padding: "0 40px", boxSizing: "border-box" }} > -

- Technical Skills -

+
+

+ Technical Skills +

+
+ Expand All +
+ +
+
+
setExpandedCategory(expandedCategory === category.category ? null : category.category)} + isExpanded={expandedCategories.includes(category.category)} + onToggle={() => toggleCategory(category.category)} /> ))}