feat: migrate icons from custom SVGs and MUI to Lucide React
Replace custom SVG icons and @mui/icons-material with lucide-react for consistent, lightweight icon management across the application. ## Changes - Add lucide-react package and remove @mui/icons-material - Create theme-aware Icon wrapper component with color resolution - Create iconMap.js for legacy icon name mappings - Migrate 64 components to use new Icon component - Remove 74 unused SVG files from assets/icons/ ## Benefits - Consistent icon API across the application - Smaller bundle size with tree-shakeable imports - Theme-aware color support via MUI theme paths - Simpler maintenance with single icon library
This commit is contained in:
1 parent
b5caabed20
commit
ba0c89fc6c
140 files changed
+421
-746
No files matched your search
@@ -3,8 +3,7 @@ import { Box, Stack, Typography } from "@mui/material";
|
||||
import { useTheme } from "@emotion/react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import PanelSkeleton from "../IncidentsSummaryPanel/skeleton.jsx";
|
||||
import Incidents from "@/assets/icons/incidents.svg?react";
|
||||
import CheckIcon from "@/assets/icons/check-icon.svg?react";
|
||||
import Icon from "@/Components/v1/Icon";
|
||||
import SummaryCard from "../SummaryCard/index.jsx";
|
||||
|
||||
/**
|
||||
@@ -64,7 +63,7 @@ const ActiveIncidentsPanel = ({ totalCount = 0, isLoading = false, error = null
|
||||
mb: theme.spacing(2),
|
||||
}}
|
||||
>
|
||||
<CheckIcon />
|
||||
<Icon name="CheckCircle" size={60} />
|
||||
</Box>
|
||||
|
||||
<Typography
|
||||
@@ -105,7 +104,7 @@ const ActiveIncidentsPanel = ({ totalCount = 0, isLoading = false, error = null
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Incidents />
|
||||
<Icon name="AlertTriangle" size={60} />
|
||||
</Box>
|
||||
|
||||
<Typography
|
||||
|
||||
@@ -3,8 +3,7 @@ import { Box, Stack, Typography } from "@mui/material";
|
||||
import { useTheme } from "@emotion/react";
|
||||
import { StatusLabel } from "@/Components/v1/Label/index.jsx";
|
||||
import { getHumanReadableDuration } from "@/Utils/timeUtils.js";
|
||||
import Monitors from "@/assets/icons/monitors.svg?react";
|
||||
import AverageResponseIcon from "@/assets/icons/status-pages.svg?react";
|
||||
import Icon from "@/Components/v1/Icon";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
const IncidentItem = ({ incident }) => {
|
||||
@@ -69,7 +68,7 @@ const IncidentItem = ({ incident }) => {
|
||||
...iconWrapperStyle,
|
||||
}}
|
||||
>
|
||||
<Monitors />
|
||||
<Icon name="Globe" size={20} />
|
||||
</Box>
|
||||
|
||||
<Stack
|
||||
@@ -101,7 +100,7 @@ const IncidentItem = ({ incident }) => {
|
||||
gap={theme.spacing(3)}
|
||||
>
|
||||
<Box sx={{ ...iconWrapperStyle }}>
|
||||
<AverageResponseIcon />
|
||||
<Icon name="Wifi" size={20} />
|
||||
</Box>
|
||||
<Stack
|
||||
direction="row"
|
||||
|
||||
@@ -4,10 +4,7 @@ import { useTheme } from "@emotion/react";
|
||||
import PanelSkeleton from "../IncidentsSummaryPanel/skeleton.jsx";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Divider } from "@mui/material";
|
||||
import Clock from "@/assets/icons/maintenance.svg?react";
|
||||
import Incidents from "@/assets/icons/incidents.svg?react";
|
||||
import ResolutionItem from "@/assets/icons/interval-check.svg?react";
|
||||
import NotificationIcon from "@/assets/icons/notifications.svg?react";
|
||||
import Icon from "@/Components/v1/Icon";
|
||||
import SummaryCard from "../SummaryCard/index.jsx";
|
||||
|
||||
/**
|
||||
@@ -89,7 +86,7 @@ const StatisticsPanel = ({ isLoading = false, error = null, summary = {} }) => {
|
||||
...iconWrapperStyle,
|
||||
}}
|
||||
>
|
||||
<NotificationIcon />
|
||||
<Icon name="Bell" size={20} />
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography
|
||||
@@ -110,7 +107,7 @@ const StatisticsPanel = ({ isLoading = false, error = null, summary = {} }) => {
|
||||
gap={theme.spacing(2)}
|
||||
>
|
||||
<Box sx={iconWrapperStyle}>
|
||||
<Incidents />
|
||||
<Icon name="AlertTriangle" size={20} />
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography
|
||||
@@ -132,7 +129,7 @@ const StatisticsPanel = ({ isLoading = false, error = null, summary = {} }) => {
|
||||
gap={theme.spacing(2)}
|
||||
>
|
||||
<Box sx={iconWrapperStyle}>
|
||||
<Clock />
|
||||
<Icon name="Wrench" size={20} />
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography
|
||||
@@ -156,7 +153,7 @@ const StatisticsPanel = ({ isLoading = false, error = null, summary = {} }) => {
|
||||
mb={theme.spacing(1.5)}
|
||||
>
|
||||
<Box sx={iconWrapperStyle}>
|
||||
<ResolutionItem />
|
||||
<Icon name="RefreshCw" size={20} />
|
||||
</Box>
|
||||
|
||||
<Box>
|
||||
|
||||
Reference in new issue
Block a user