Enhance skill evaluation UI with category icons and URL state management
- Added category icons to the skill evaluation components for better visual representation. - Implemented URL parameter handling in SkillEvaluation to maintain selected category state across navigation. - Improved the HomePage layout with expandable skill categories and enhanced user interaction. - Updated skill data files to include icon properties for each category.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { ChevronRight } from "lucide-react";
|
||||
import { SkillCategory } from "@/lib/types";
|
||||
import { getCategoryIcon } from "@/lib/category-icons";
|
||||
|
||||
interface CategoryTabsProps {
|
||||
categories: SkillCategory[];
|
||||
@@ -16,12 +17,13 @@ export function CategoryTabs({
|
||||
<div className="flex flex-wrap gap-2 mb-8">
|
||||
{categories.map((category) => {
|
||||
const isActive = selectedCategory === category.category;
|
||||
const CategoryIcon = getCategoryIcon(category.icon);
|
||||
return (
|
||||
<button
|
||||
key={category.category}
|
||||
onClick={() => onCategoryChange(category.category)}
|
||||
className={`
|
||||
relative px-6 py-3 rounded-xl font-medium transition-all duration-300 group
|
||||
relative px-6 py-3 rounded-xl font-medium transition-all duration-300 group flex items-center gap-2
|
||||
${
|
||||
isActive
|
||||
? "bg-blue-500 text-white shadow-lg shadow-blue-500/25"
|
||||
@@ -29,6 +31,7 @@ export function CategoryTabs({
|
||||
}
|
||||
`}
|
||||
>
|
||||
<CategoryIcon className="w-4 h-4 relative z-10" />
|
||||
<span className="relative z-10">{category.category}</span>
|
||||
{isActive && (
|
||||
<div className="absolute inset-0 rounded-xl bg-gradient-to-r from-blue-600/20 to-blue-400/20 animate-pulse" />
|
||||
|
||||
Reference in New Issue
Block a user