feat(11-02): add useReorderCandidates hook, candidateViewMode, and CandidateListItem component
- Add useReorderCandidates mutation hook with apiPatch to /candidates/reorder endpoint - Add candidateViewMode (list|grid) state and setCandidateViewMode to uiStore - Create CandidateListItem component with drag handle, rank badge, horizontal layout - Export RankBadge helper (gold/silver/bronze medal icons for top 3) - Add style prop support to LucideIcon component - Add pros/cons fields to CandidateWithCategory in useThreads.ts
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { icons } from "lucide-react";
|
||||
import type React from "react";
|
||||
|
||||
// --- Emoji to Lucide icon mapping (for migration/fallback) ---
|
||||
|
||||
@@ -232,18 +233,20 @@ interface LucideIconProps {
|
||||
name: string;
|
||||
size?: number;
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
}
|
||||
|
||||
export function LucideIcon({
|
||||
name,
|
||||
size = 20,
|
||||
className = "",
|
||||
style,
|
||||
}: LucideIconProps) {
|
||||
const pascalName = toPascalCase(name);
|
||||
const IconComponent = icons[pascalName as keyof typeof icons];
|
||||
if (!IconComponent) {
|
||||
const FallbackIcon = icons.Package;
|
||||
return <FallbackIcon size={size} className={className} />;
|
||||
return <FallbackIcon size={size} className={className} style={style} />;
|
||||
}
|
||||
return <IconComponent size={size} className={className} />;
|
||||
return <IconComponent size={size} className={className} style={style} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user