From 9d3bb12a5ab381d4bb74dc287d10aa94bf80e2be Mon Sep 17 00:00:00 2001 From: Ana Maksimovskikh Date: Mon, 11 Mar 2024 16:07:09 +0000 Subject: [PATCH] Migrate from using react-icons --- src/GoogleAuth/GoogleAuth.tsx | 4 +-- src/assets/icons/Google.tsx | 29 +++++++++++++++++++ src/assets/icons/Ledger.tsx | 12 +++++--- src/assets/icons/ThreeDots.tsx | 17 +++++++++++ src/assets/icons/index.tsx | 2 ++ .../AddressTile/AddressTileIcon.tsx | 9 +----- src/components/PopoverMenu.tsx | 5 ++-- 7 files changed, 61 insertions(+), 17 deletions(-) create mode 100644 src/assets/icons/Google.tsx create mode 100644 src/assets/icons/ThreeDots.tsx diff --git a/src/GoogleAuth/GoogleAuth.tsx b/src/GoogleAuth/GoogleAuth.tsx index 083f13a963..5ec62e9c35 100644 --- a/src/GoogleAuth/GoogleAuth.tsx +++ b/src/GoogleAuth/GoogleAuth.tsx @@ -1,7 +1,7 @@ import { IconButton } from "@chakra-ui/react"; -import { FcGoogle } from "react-icons/fc"; import { getGoogleCredentials } from "./getGoogleCredentials"; +import { GoogleIcon } from "../assets/icons"; import colors from "../style/colors"; import { useAsyncActionHandler } from "../utils/hooks/useAsyncActionHandler"; @@ -37,7 +37,7 @@ export const GoogleAuth: React.FC<{ onAuth: (secretKey: string, email: string) = _disabled={{ bg: colors.gray[900] }} aria-label="Google SSO" data-testid="google-auth-button" - icon={} + icon={} isLoading={isLoading} onClick={onClick} size="lg" diff --git a/src/assets/icons/Google.tsx b/src/assets/icons/Google.tsx new file mode 100644 index 0000000000..3944d93ffe --- /dev/null +++ b/src/assets/icons/Google.tsx @@ -0,0 +1,29 @@ +import { Icon, IconProps } from "@chakra-ui/react"; + +export const GoogleIcon: React.FC = props => ( + + + + + + +); diff --git a/src/assets/icons/Ledger.tsx b/src/assets/icons/Ledger.tsx index f855d143bf..c0348e5335 100644 --- a/src/assets/icons/Ledger.tsx +++ b/src/assets/icons/Ledger.tsx @@ -1,14 +1,18 @@ import { Icon, IconProps } from "@chakra-ui/react"; -import { MdUsb } from "react-icons/md"; + +import colors from "../../style/colors"; export const LedgerIcon: React.FC = props => ( + > + + ); diff --git a/src/assets/icons/ThreeDots.tsx b/src/assets/icons/ThreeDots.tsx new file mode 100644 index 0000000000..1b0a8e2df6 --- /dev/null +++ b/src/assets/icons/ThreeDots.tsx @@ -0,0 +1,17 @@ +import { Icon, IconProps } from "@chakra-ui/react"; + +import colors from "../../style/colors"; + +export const ThreeDotsIcon: React.FC = props => ( + + + +); diff --git a/src/assets/icons/index.tsx b/src/assets/icons/index.tsx index 4437949b44..261c569804 100644 --- a/src/assets/icons/index.tsx +++ b/src/assets/icons/index.tsx @@ -31,6 +31,7 @@ export * from "./FileArrowDown"; export * from "./FileCopy"; export * from "./FlipForwardEnergy"; export * from "./Gear"; +export * from "./Google"; export * from "./Help"; export * from "./Hourglass"; export * from "./IncomingArrow"; @@ -50,6 +51,7 @@ export * from "./Slash"; export * from "./Sliders"; export * from "./Social"; export * from "./Tez"; +export * from "./ThreeDots"; export * from "./Token"; export * from "./Trash"; export * from "./UnknownContact"; diff --git a/src/components/AddressTile/AddressTileIcon.tsx b/src/components/AddressTile/AddressTileIcon.tsx index 3e13e546c9..d43ddd9ca0 100644 --- a/src/components/AddressTile/AddressTileIcon.tsx +++ b/src/components/AddressTile/AddressTileIcon.tsx @@ -61,14 +61,7 @@ export const AddressTileIcon: React.FC<{ /> ); case "ledger": - return ( - - ); + return ; case "multisig": return ; case "contact": diff --git a/src/components/PopoverMenu.tsx b/src/components/PopoverMenu.tsx index 6524c8c4ae..1d89d7ed81 100644 --- a/src/components/PopoverMenu.tsx +++ b/src/components/PopoverMenu.tsx @@ -1,7 +1,6 @@ import { Button, Center, - Icon, Popover, PopoverBody, PopoverContent, @@ -9,8 +8,8 @@ import { useDisclosure, } from "@chakra-ui/react"; import { ReactNode } from "react"; -import { BsThreeDots } from "react-icons/bs"; +import { ThreeDotsIcon } from "../assets/icons"; import colors from "../style/colors"; export const PopoverMenu: React.FC<{ @@ -32,7 +31,7 @@ export const PopoverMenu: React.FC<{ variant="unstyled" >
- +