diff --git a/src/assets/icons/all.svg b/src/assets/icons/all.svg new file mode 100644 index 0000000..f2cb2d6 --- /dev/null +++ b/src/assets/icons/all.svg @@ -0,0 +1,12 @@ + + + diff --git a/src/assets/icons/copy.svg b/src/assets/icons/copy.svg new file mode 100644 index 0000000..3d9aa4b --- /dev/null +++ b/src/assets/icons/copy.svg @@ -0,0 +1,6 @@ + + + diff --git a/src/assets/icons/download-file.svg b/src/assets/icons/download-file.svg new file mode 100644 index 0000000..01ce6c8 --- /dev/null +++ b/src/assets/icons/download-file.svg @@ -0,0 +1,6 @@ + + + diff --git a/src/assets/icons/favorite.svg b/src/assets/icons/favorite.svg new file mode 100644 index 0000000..472d51f --- /dev/null +++ b/src/assets/icons/favorite.svg @@ -0,0 +1,12 @@ + + + diff --git a/src/assets/icons/plus.svg b/src/assets/icons/plus.svg new file mode 100644 index 0000000..f6dddea --- /dev/null +++ b/src/assets/icons/plus.svg @@ -0,0 +1,12 @@ + + + diff --git a/src/assets/icons/warning-circle.svg b/src/assets/icons/warning-circle.svg new file mode 100644 index 0000000..8cb9cc2 --- /dev/null +++ b/src/assets/icons/warning-circle.svg @@ -0,0 +1,13 @@ + + + diff --git a/src/components/Upload/UploadFile.tsx b/src/components/Upload/UploadFile.tsx index faed619..d316f72 100644 --- a/src/components/Upload/UploadFile.tsx +++ b/src/components/Upload/UploadFile.tsx @@ -2,12 +2,15 @@ import { useRef, useReducer, Reducer, useEffect, useCallback } from "react"; import { attributes } from "../utils/attributes"; import { PrettyBytes } from "../utils/bytes"; import { UploadStatus } from "./types"; -import { CircleCheck, TriangleAlert, CircleX, CircleStop } from "lucide-react"; +import { CircleStop } from "lucide-react"; import { Spinner } from "../Spinner/Spinner"; import { CodexData } from "@codex-storage/sdk-js"; import { ButtonIcon } from "../ButtonIcon/ButtonIcon"; import "./UploadFile.css"; import { WebFileIcon } from "../WebFileIcon/WebFileIcon"; +import SuccessCircleIcon from "../../assets/icons/success-circle.svg?react"; +import WarningCircleIcon from "../../assets/icons/warning-circle.svg?react"; +import CloseIcon from "../../assets/icons/close.svg?react"; type UploadFileProps = { file: File; @@ -332,25 +335,19 @@ export function UploadStatusIcon({ status }: UploadStatusIconProps) { switch (status) { case "done": return ( - + ); case "error": return ( - + > ); case "progress": - return ; + return ; } } @@ -358,7 +355,7 @@ function UploadActionIcon({ status }: UploadStatusIconProps) { switch (status) { case "error": case "done": - return ; + return ; case "progress": return ; } diff --git a/stories/Button.stories.ts b/stories/Button.stories.ts index 1e52673..03dbbff 100644 --- a/stories/Button.stories.ts +++ b/stories/Button.stories.ts @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from "@storybook/react"; import { fn } from "@storybook/test"; import { Button } from "../src/components/Button/Button"; -import { Plus } from "lucide-react"; +import PlusIcon from "../src/assets/icons/plus.svg?react"; // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export const meta = { @@ -47,7 +47,7 @@ export const Outline: Story = { export const Icon: Story = { args: { label: "Button", - Icon: Plus, + Icon: PlusIcon, }, }; diff --git a/stories/ButtonIcon.stories.ts b/stories/ButtonIcon.stories.ts index f89a591..c0a3d5a 100644 --- a/stories/ButtonIcon.stories.ts +++ b/stories/ButtonIcon.stories.ts @@ -1,7 +1,9 @@ import type { Meta, StoryObj } from "@storybook/react"; import { fn } from "@storybook/test"; -import { Copy, Download, Plus } from "lucide-react"; import { ButtonIcon } from "../src/components/ButtonIcon/ButtonIcon"; +import CopyIcon from "../src/assets/icons/copy.svg?react"; +import DownloadFileIcon from "../src/assets/icons/download-file.svg?react"; +import PlusIcon from "../src/assets/icons/plus.svg?react"; const meta = { title: "Components/ButtonIcon", @@ -23,42 +25,42 @@ type Story = StoryObj; export const Small: Story = { args: { - Icon: Plus, + Icon: PlusIcon, variant: "small", }, }; export const Big: Story = { args: { - Icon: Plus, + Icon: PlusIcon, variant: "big", }, }; export const Disabled: Story = { args: { - Icon: Plus, + Icon: PlusIcon, disabled: true, }, }; export const BuzzAnimation: Story = { args: { - Icon: Copy, + Icon: CopyIcon, animation: "buzz" }, }; export const BounceAnimation: Story = { args: { - Icon: Download, + Icon: DownloadFileIcon, animation: "bounce" }, }; export const CustomStyle: Story = { args: { - Icon: Plus, + Icon: PlusIcon, variant: "big", }, }; diff --git a/stories/InputIcon.tsx b/stories/InputIcon.tsx index efacff6..46de422 100644 --- a/stories/InputIcon.tsx +++ b/stories/InputIcon.tsx @@ -1,5 +1,5 @@ -import { User } from "lucide-react"; +import PlusIcon from "../src/assets/icons/plus.svg?react"; export function InputIcon() { - return ; + return ; } diff --git a/stories/Tabs.stories.tsx b/stories/Tabs.stories.tsx index d6d08db..93e90f6 100644 --- a/stories/Tabs.stories.tsx +++ b/stories/Tabs.stories.tsx @@ -1,6 +1,8 @@ import type { Meta } from "@storybook/react"; import { useState } from "react"; -import { FilesIcon, Star } from "lucide-react"; +import AllFilesIcon from "../src/assets/icons/all.svg?react"; +import FavoriteIcon from "../src/assets/icons/favorite.svg?react"; + import { Tabs } from "../src/components/Tabs/Tabs"; import { fn } from "@storybook/test"; @@ -33,11 +35,11 @@ const Template = (props: { onTabChange: () => void }) => { tabs={[ { label: "All files", - Icon: () => , + Icon: () => , }, { label: "Favorites", - Icon: () => , + Icon: () => , }, ]} /> diff --git a/stories/Tooltip.stories.tsx b/stories/Tooltip.stories.tsx index 5d24d92..faebe73 100644 --- a/stories/Tooltip.stories.tsx +++ b/stories/Tooltip.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/react"; import { Tooltip } from "../src/components/Tooltip/Tooltip"; -import { CheckCircle } from "lucide-react"; +import SuccessCircleIcon from "../src/assets/icons/success-circle.svg?react"; const meta = { title: "Overlays/Tooltip", @@ -18,6 +18,6 @@ type Story = StoryObj; export const Default: Story = { args: { message: "Hello world", - children: , + children: , }, };