Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: replace MUI icons - 6 #17751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions site/src/components/GlobalSnackbar/EnterpriseSnackbar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Interpolation, Theme } from "@emotion/react";
import CloseIcon from "@mui/icons-material/Close";
import IconButton from "@mui/material/IconButton";
import Snackbar, {
type SnackbarProps as MuiSnackbarProps,
} from "@mui/material/Snackbar";
import { type ClassName, useClassName } from "hooks/useClassName";
import { X as XIcon } from "lucide-react";
import type { FC } from "react";

type EnterpriseSnackbarVariant = "error" | "info" | "success";
Expand Down Expand Up @@ -47,7 +47,11 @@ export const EnterpriseSnackbar: FC<EnterpriseSnackbarProps> = ({
<div css={styles.actionWrapper}>
{action}
<IconButton onClick={onClose} css={{ padding: 0 }}>
<CloseIcon css={styles.closeIcon} aria-label="close" />
<XIcon
css={styles.closeIcon}
aria-label="close"
className="size-icon-sm"
/>
</IconButton>
</div>
}
Expand Down Expand Up @@ -96,8 +100,6 @@ const styles = {
alignItems: "center",
},
closeIcon: (theme) => ({
width: 25,
height: 25,
color: theme.palette.primary.contrastText,
}),
} satisfies Record<string, Interpolation<Theme>>;
16 changes: 10 additions & 6 deletions site/src/modules/provisioners/ProvisionerTag.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Interpolation, Theme } from "@emotion/react";
import CheckCircleOutlined from "@mui/icons-material/CheckCircleOutlined";
import CloseIcon from "@mui/icons-material/Close";
import DoNotDisturbOnOutlined from "@mui/icons-material/DoNotDisturbOnOutlined";
import Sell from "@mui/icons-material/Sell";
import IconButton from "@mui/material/IconButton";
import { Pill } from "components/Pill/Pill";
import { CircleCheck as CircleCheckIcon } from "lucide-react";
import { CircleMinus as CircleMinusIcon } from "lucide-react";
import { Tag as TagIcon } from "lucide-react";
import type { ComponentProps, FC } from "react";

const parseBool = (s: string): { valid: boolean; value: boolean } => {
Expand Down Expand Up @@ -62,7 +62,11 @@ export const ProvisionerTag: FC<ProvisionerTagProps> = ({
return <BooleanPill value={boolValue}>{content}</BooleanPill>;
}
return (
<Pill size="lg" icon={<Sell />} data-testid={`tag-${tagName}`}>
<Pill
size="lg"
icon={<TagIcon className="size-icon-sm" />}
data-testid={`tag-${tagName}`}
>
{content}
</Pill>
);
Expand All @@ -83,9 +87,9 @@ const BooleanPill: FC<BooleanPillProps> = ({
size="lg"
icon={
value ? (
<CheckCircleOutlined css={styles.truePill} />
<CircleCheckIcon css={styles.truePill} className="size-icon-sm" />
) : (
<DoNotDisturbOnOutlined css={styles.falsePill} />
<CircleMinusIcon css={styles.falsePill} className="size-icon-sm" />
)
}
{...divProps}
Expand Down
4 changes: 2 additions & 2 deletions site/src/modules/resources/PortForwardButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { type Interpolation, type Theme, useTheme } from "@emotion/react";
import CloseIcon from "@mui/icons-material/Close";
import LockIcon from "@mui/icons-material/Lock";
import LockOpenIcon from "@mui/icons-material/LockOpen";
import OpenInNewOutlined from "@mui/icons-material/OpenInNewOutlined";
Expand Down Expand Up @@ -41,6 +40,7 @@ import {
} from "components/deprecated/Popover/Popover";
import { type FormikContextType, useFormik } from "formik";
import { type ClassName, useClassName } from "hooks/useClassName";
import { X as XIcon } from "lucide-react";
import { ChevronDownIcon } from "lucide-react";
import { useDashboard } from "modules/dashboard/useDashboard";
import { type FC, useState } from "react";
Expand Down Expand Up @@ -497,7 +497,7 @@ export const PortForwardPopoverView: FC<PortForwardPopoverViewProps> = ({
await sharedPortsQuery.refetch();
}}
>
<CloseIcon
<XIcon
css={{
width: 14,
height: 14,
Expand Down
4 changes: 2 additions & 2 deletions site/src/pages/CreateTemplatePage/BuildLogsDrawer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Interpolation, Theme } from "@emotion/react";
import Close from "@mui/icons-material/Close";
import WarningOutlined from "@mui/icons-material/WarningOutlined";
import Button from "@mui/material/Button";
import Drawer from "@mui/material/Drawer";
Expand All @@ -8,6 +7,7 @@ import { visuallyHidden } from "@mui/utils";
import { JobError } from "api/queries/templates";
import type { TemplateVersion } from "api/typesGenerated";
import { Loader } from "components/Loader/Loader";
import { X as XIcon } from "lucide-react";
import { AlertVariant } from "modules/provisioners/ProvisionerAlert";
import { ProvisionerStatusAlert } from "modules/provisioners/ProvisionerStatusAlert";
import { useWatchVersionLogs } from "modules/templates/useWatchVersionLogs";
Expand Down Expand Up @@ -66,7 +66,7 @@ export const BuildLogsDrawer: FC<BuildLogsDrawerProps> = ({
<header css={styles.header}>
<h3 css={styles.title}>Creating template...</h3>
<IconButton size="small" onClick={drawerProps.onClose}>
<Close css={styles.closeIcon} />
<XIcon css={styles.closeIcon} />
<span style={visuallyHidden}>Close build logs</span>
</IconButton>
</header>
Expand Down
10 changes: 5 additions & 5 deletions site/src/pages/HealthPage/Content.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { css } from "@emotion/css";
import { useTheme } from "@emotion/react";
import CheckCircleOutlined from "@mui/icons-material/CheckCircleOutlined";
import DoNotDisturbOnOutlined from "@mui/icons-material/DoNotDisturbOnOutlined";
import ErrorOutline from "@mui/icons-material/ErrorOutline";
import Link from "@mui/material/Link";
import type { HealthCode, HealthSeverity } from "api/typesGenerated";
import { CircleCheck as CircleCheckIcon } from "lucide-react";
import { CircleMinus as CircleMinusIcon } from "lucide-react";
import {
type ComponentProps,
type FC,
Expand Down Expand Up @@ -57,7 +57,7 @@ interface HealthIconProps {
export const HealthIcon: FC<HealthIconProps> = ({ size, severity }) => {
const theme = useTheme();
const color = healthyColor(theme, severity);
const Icon = severity === "error" ? ErrorOutline : CheckCircleOutlined;
const Icon = severity === "error" ? ErrorOutline : CircleCheckIcon;

return <Icon css={{ width: size, height: size, color }} />;
};
Expand Down Expand Up @@ -201,9 +201,9 @@ export const BooleanPill: FC<BooleanPillProps> = ({
<Pill
icon={
value ? (
<CheckCircleOutlined css={{ color }} />
<CircleCheckIcon css={{ color }} className="size-icon-sm" />
) : (
<DoNotDisturbOnOutlined css={{ color }} />
<CircleMinusIcon css={{ color }} className="size-icon-sm" />
)
}
{...divProps}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useTheme } from "@emotion/react";
import CancelOutlined from "@mui/icons-material/CancelOutlined";
import CheckCircleOutlined from "@mui/icons-material/CheckCircleOutlined";
import LinkOutlined from "@mui/icons-material/LinkOutlined";
import LinearProgress from "@mui/material/LinearProgress";
import Link from "@mui/material/Link";
Expand Down Expand Up @@ -45,6 +44,7 @@ import {
subDays,
} from "date-fns";
import { useEmbeddedMetadata } from "hooks/useEmbeddedMetadata";
import { CircleCheck as CircleCheckIcon } from "lucide-react";
import { useTemplateLayoutContext } from "pages/TemplatePage/TemplateLayout";
import {
type FC,
Expand Down Expand Up @@ -759,12 +759,11 @@ const ParameterUsageLabel: FC<ParameterUsageLabelProps> = ({
</>
) : (
<>
<CheckCircleOutlined
<CircleCheckIcon
css={{
width: 16,
height: 16,
color: theme.palette.success.light,
}}
className="size-icon-xs"
/>
True
</>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useTheme } from "@emotion/react";
import CheckCircleOutlined from "@mui/icons-material/CheckCircleOutlined";
import GitHubIcon from "@mui/icons-material/GitHub";
import KeyIcon from "@mui/icons-material/VpnKey";
import Button from "@mui/material/Button";
Expand All @@ -16,6 +15,7 @@ import type {
import { ConfirmDialog } from "components/Dialogs/ConfirmDialog/ConfirmDialog";
import { EmptyState } from "components/EmptyState/EmptyState";
import { Stack } from "components/Stack/Stack";
import { CircleCheck as CircleCheckIcon } from "lucide-react";
import { type FC, useState } from "react";
import { useMutation } from "react-query";
import { docs } from "utils/docs";
Expand Down Expand Up @@ -191,11 +191,11 @@ export const SingleSignOnSection: FC<SingleSignOnSectionProps> = ({
fontSize: 14,
}}
>
<CheckCircleOutlined
<CircleCheckIcon
css={{
color: theme.palette.success.light,
fontSize: 16,
}}
className="size-icon-xs"
/>
<span>
Authenticated with{" "}
Expand Down
Loading