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

Skip to content

chore: replace MUI icons - 4 #17748

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 3 commits 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
14 changes: 4 additions & 10 deletions site/src/components/FileUpload/FileUpload.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { type Interpolation, type Theme, css } from "@emotion/react";
import UploadIcon from "@mui/icons-material/CloudUploadOutlined";
import RemoveIcon from "@mui/icons-material/DeleteOutline";
import FileIcon from "@mui/icons-material/FolderOutlined";
import CircularProgress from "@mui/material/CircularProgress";
import IconButton from "@mui/material/IconButton";
import { Stack } from "components/Stack/Stack";
import { useClickable } from "hooks/useClickable";
import { CloudUploadIcon, FolderIcon, TrashIcon } from "lucide-react";
import { type DragEvent, type FC, type ReactNode, useRef } from "react";

export interface FileUploadProps {
Expand Down Expand Up @@ -44,12 +42,12 @@ export const FileUpload: FC<FileUploadProps> = ({
alignItems="center"
>
<Stack direction="row" alignItems="center">
<FileIcon />
<FolderIcon className="size-icon-sm" />
<span>{file.name}</span>
</Stack>

<IconButton title={removeLabel} size="small" onClick={onRemove}>
<RemoveIcon />
<TrashIcon className="size-icon-sm" />
</IconButton>
</Stack>
);
Expand All @@ -68,7 +66,7 @@ export const FileUpload: FC<FileUploadProps> = ({
{isUploading ? (
<CircularProgress size={32} />
) : (
<UploadIcon css={styles.icon} />
<CloudUploadIcon className="size-16" />
)}
</div>

Expand Down Expand Up @@ -166,10 +164,6 @@ const styles = {
justifyContent: "center",
},

icon: {
fontSize: 64,
},

title: {
fontSize: 16,
lineHeight: "1",
Expand Down
8 changes: 6 additions & 2 deletions site/src/components/FullPageLayout/Topbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
cloneElement,
forwardRef,
} from "react";
import { cn } from "utils/cn";

export const Topbar: FC<HTMLAttributes<HTMLElement>> = (props) => {
const theme = useTheme();
Expand Down Expand Up @@ -89,7 +90,7 @@ type TopbarIconProps = HTMLAttributes<HTMLOrSVGElement>;

export const TopbarIcon = forwardRef<HTMLOrSVGElement, TopbarIconProps>(
(props: TopbarIconProps, ref) => {
const { children, ...restProps } = props;
const { children, className, ...restProps } = props;
const theme = useTheme();

return cloneElement(
Expand All @@ -101,7 +102,10 @@ export const TopbarIcon = forwardRef<HTMLOrSVGElement, TopbarIconProps>(
{
...restProps,
ref,
className: css({ fontSize: 16, color: theme.palette.text.disabled }),
className: cn([
css({ fontSize: 16, color: theme.palette.text.disabled }),
"size-icon-sm",
]),
},
);
},
Expand Down
4 changes: 2 additions & 2 deletions site/src/pages/GroupsPage/GroupPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Interpolation, Theme } from "@emotion/react";
import DeleteOutline from "@mui/icons-material/DeleteOutline";
import PersonAdd from "@mui/icons-material/PersonAdd";
import SettingsOutlined from "@mui/icons-material/SettingsOutlined";
import LoadingButton from "@mui/lab/LoadingButton";
Expand Down Expand Up @@ -51,6 +50,7 @@ import {
TableToolbar,
} from "components/TableToolbar/TableToolbar";
import { MemberAutocomplete } from "components/UserAutocomplete/UserAutocomplete";
import { TrashIcon } from "lucide-react";
import { EllipsisVertical } from "lucide-react";
import { type FC, useState } from "react";
import { Helmet } from "react-helmet-async";
Expand Down Expand Up @@ -134,7 +134,7 @@ const GroupPage: FC = () => {
onClick={() => {
setIsDeletingGroup(true);
}}
startIcon={<DeleteOutline />}
startIcon={<TrashIcon className="size-icon-sm" />}
css={styles.removeButton}
>
Delete&hellip;
Expand Down
4 changes: 2 additions & 2 deletions site/src/pages/UserSettingsPage/TokensPage/TokensPageView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useTheme } from "@emotion/react";
import DeleteOutlineIcon from "@mui/icons-material/DeleteOutline";
import IconButton from "@mui/material/IconButton";
import Table from "@mui/material/Table";
import TableBody from "@mui/material/TableBody";
Expand All @@ -15,6 +14,7 @@ import { TableEmpty } from "components/TableEmpty/TableEmpty";
import { TableLoader } from "components/TableLoader/TableLoader";
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
import { TrashIcon } from "lucide-react";
import type { FC, ReactNode } from "react";

dayjs.extend(relativeTime);
Expand Down Expand Up @@ -115,7 +115,7 @@ export const TokensPageView: FC<TokensPageViewProps> = ({
size="medium"
aria-label="Delete token"
>
<DeleteOutlineIcon />
<TrashIcon className="size-icon-sm" />
</IconButton>
</span>
</TableCell>
Expand Down
4 changes: 2 additions & 2 deletions site/src/pages/WorkspacePage/WorkspaceTopbar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { type Interpolation, type Theme, useTheme } from "@emotion/react";
import ArrowBackOutlined from "@mui/icons-material/ArrowBackOutlined";
import DeleteOutline from "@mui/icons-material/DeleteOutline";
import QuotaIcon from "@mui/icons-material/MonetizationOnOutlined";
import Link from "@mui/material/Link";
import Tooltip from "@mui/material/Tooltip";
Expand All @@ -18,6 +17,7 @@ import {
} from "components/FullPageLayout/Topbar";
import { HelpTooltipContent } from "components/HelpTooltip/HelpTooltip";
import { Popover, PopoverTrigger } from "components/deprecated/Popover/Popover";
import { TrashIcon } from "lucide-react";
import { useDashboard } from "modules/dashboard/useDashboard";
import { linkToTemplate, useLinks } from "modules/navigation";
import { WorkspaceStatusBadge } from "modules/workspaces/WorkspaceStatusBadge/WorkspaceStatusBadge";
Expand Down Expand Up @@ -199,7 +199,7 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
{shouldDisplayDormantData && (
<TopbarData>
<TopbarIcon>
<DeleteOutline />
<TrashIcon />
</TopbarIcon>
<Link
component={RouterLink}
Expand Down
Loading