mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
perf: reduce bundle size by 21% with direct icon imports (#3844)
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { IconButton } from "@mui/joy";
|
||||
import { PaperclipIcon } from "lucide-react";
|
||||
import { useContext, useRef, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import Icon from "@/components/Icon";
|
||||
import { useResourceStore } from "@/store/v1";
|
||||
import { Resource } from "@/types/proto/api/v1/resource_service";
|
||||
import { MemoEditorContext } from "../types";
|
||||
@ -67,7 +67,7 @@ const UploadResourceButton = () => {
|
||||
|
||||
return (
|
||||
<IconButton size="sm" disabled={state.uploadingFlag}>
|
||||
<Icon.Paperclip className="w-5 h-5 mx-auto" />
|
||||
<PaperclipIcon className="w-5 h-5 mx-auto" />
|
||||
<input
|
||||
className="absolute inset-0 w-full h-full opacity-0 cursor-pointer"
|
||||
ref={fileInputRef}
|
||||
|
Reference in New Issue
Block a user