Skip to content

Commit f4d21dc

Browse files
committed
fix(frontend): route 5 Lucide icons through design-system wrapper (#81)
Re-export Building2, MapPin, Layers, GitBranch, Cpu from design-system/icons.tsx and switch EquipmentPicker to use the centralized wrapper, restoring DESIGN_PLAN §7 compliance. Visual rendering is pixel-identical: LevelIcon still passes strokeWidth={1.75} explicitly, which overrides the wrapper default. Closes #81
1 parent 924bee8 commit f4d21dc

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

frontend/src/app/EquipmentPicker.tsx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
import { AnimatePresence, motion } from "framer-motion";
2-
import {
3-
Building2 as RawBuilding2,
4-
Cpu as RawCpu,
5-
GitBranch as RawGitBranch,
6-
Layers as RawLayers,
7-
MapPin as RawMapPin,
8-
} from "lucide-react";
92
import {
103
type KeyboardEvent as ReactKeyboardEvent,
114
useCallback,
@@ -812,11 +805,11 @@ const LEVEL_ICON: Record<
812805
TreeLevel,
813806
React.ComponentType<{ className?: string; strokeWidth?: number }>
814807
> = {
815-
enterprise: RawBuilding2,
816-
site: RawMapPin,
817-
area: RawLayers,
818-
line: RawGitBranch,
819-
cell: RawCpu,
808+
enterprise: Icons.Building2,
809+
site: Icons.MapPin,
810+
area: Icons.Layers,
811+
line: Icons.GitBranch,
812+
cell: Icons.Cpu,
820813
};
821814

822815
function LevelIcon({ level, className }: { level: TreeLevel; className?: string }) {

frontend/src/design-system/icons.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
AlertTriangle as RawAlertTriangle,
66
ArrowRight as RawArrowRight,
77
Bot as RawBot,
8+
Building2 as RawBuilding2,
89
Check as RawCheck,
910
ChevronDown as RawChevronDown,
1011
ChevronLeft as RawChevronLeft,
@@ -14,12 +15,16 @@ import {
1415
Clock as RawClock,
1516
Command as RawCommand,
1617
Copy as RawCopy,
18+
Cpu as RawCpu,
1719
Database as RawDatabase,
1820
Eye as RawEye,
1921
FileText as RawFileText,
2022
Filter as RawFilter,
2123
Gauge as RawGauge,
24+
GitBranch as RawGitBranch,
25+
Layers as RawLayers,
2226
LogOut as RawLogOut,
27+
MapPin as RawMapPin,
2328
MessageSquare as RawMessageSquare,
2429
Monitor as RawMonitor,
2530
MoreHorizontal as RawMoreHorizontal,
@@ -61,6 +66,7 @@ export const AlertCircle = styled(RawAlertCircle, "AlertCircle");
6166
export const AlertTriangle = styled(RawAlertTriangle, "AlertTriangle");
6267
export const ArrowRight = styled(RawArrowRight, "ArrowRight");
6368
export const Bot = styled(RawBot, "Bot");
69+
export const Building2 = styled(RawBuilding2, "Building2");
6470
export const Check = styled(RawCheck, "Check");
6571
export const ChevronDown = styled(RawChevronDown, "ChevronDown");
6672
export const ChevronLeft = styled(RawChevronLeft, "ChevronLeft");
@@ -70,12 +76,16 @@ export const CircleDot = styled(RawCircleDot, "CircleDot");
7076
export const Clock = styled(RawClock, "Clock");
7177
export const Command = styled(RawCommand, "Command");
7278
export const Copy = styled(RawCopy, "Copy");
79+
export const Cpu = styled(RawCpu, "Cpu");
7380
export const Database = styled(RawDatabase, "Database");
7481
export const Eye = styled(RawEye, "Eye");
7582
export const FileText = styled(RawFileText, "FileText");
7683
export const Filter = styled(RawFilter, "Filter");
7784
export const Gauge = styled(RawGauge, "Gauge");
85+
export const GitBranch = styled(RawGitBranch, "GitBranch");
86+
export const Layers = styled(RawLayers, "Layers");
7887
export const LogOut = styled(RawLogOut, "LogOut");
88+
export const MapPin = styled(RawMapPin, "MapPin");
7989
export const MessageSquare = styled(RawMessageSquare, "MessageSquare");
8090
export const Monitor = styled(RawMonitor, "Monitor");
8191
export const MoreHorizontal = styled(RawMoreHorizontal, "MoreHorizontal");

0 commit comments

Comments
 (0)