From fc1ee5a9e2ccd39d3f6a32c8a4fefd40a50106ae Mon Sep 17 00:00:00 2001 From: ioay Date: Sun, 28 Jan 2024 15:48:47 +0100 Subject: [PATCH 1/2] Update theme for connect buttons --- dapp/src/assets/icons/Ethereum.tsx | 40 ++++++-------------- dapp/src/components/Header/ConnectWallet.tsx | 6 +-- dapp/src/theme/Button.ts | 13 ++++--- 3 files changed, 22 insertions(+), 37 deletions(-) diff --git a/dapp/src/assets/icons/Ethereum.tsx b/dapp/src/assets/icons/Ethereum.tsx index b3c5c5633..27cf854c6 100644 --- a/dapp/src/assets/icons/Ethereum.tsx +++ b/dapp/src/assets/icons/Ethereum.tsx @@ -1,40 +1,22 @@ import React from "react" import { createIcon } from "@chakra-ui/react" -export const Ethereum = createIcon({ - displayName: "Ethereum", - viewBox: "0 0 28 28", +export const EthereumIcon = createIcon({ + displayName: "EthereumIcon", + viewBox: "0 0 24 25", path: [ - - + + - - - - - , - - + + , ], diff --git a/dapp/src/components/Header/ConnectWallet.tsx b/dapp/src/components/Header/ConnectWallet.tsx index 5e2445406..f1f3546f6 100644 --- a/dapp/src/components/Header/ConnectWallet.tsx +++ b/dapp/src/components/Header/ConnectWallet.tsx @@ -8,7 +8,7 @@ import { } from "#/hooks" import { CurrencyBalance } from "#/components/shared/CurrencyBalance" import { TextMd } from "#/components/shared/Typography" -import { Bitcoin, Ethereum } from "#/assets/icons" +import { Bitcoin, EthereumIcon } from "#/assets/icons" import { truncateAddress, asyncWrapper } from "#/utils" export type ConnectButtonsProps = { @@ -22,7 +22,7 @@ function ConnectButton({ account, requestAccount, }: ConnectButtonsProps) { - const colorScheme = !account ? "error" : undefined + const colorScheme = !account ? "error" : "gold" const handleClick = () => { asyncWrapper(requestAccount()) @@ -62,7 +62,7 @@ export default function ConnectWallet() { }} /> { await requestEthereumAccount() diff --git a/dapp/src/theme/Button.ts b/dapp/src/theme/Button.ts index 66884f78b..e318c7032 100644 --- a/dapp/src/theme/Button.ts +++ b/dapp/src/theme/Button.ts @@ -66,12 +66,13 @@ export const buttonTheme: ComponentSingleStyleConfig = { // FIXME: It should be removed and replaced by solid/outline variants card: ({ colorScheme }: StyleFunctionProps) => { const defaultStyles = { - borderWidth: "2px", + fontWeight: "medium", + borderWidth: "1px", borderColor: "gold.100", - borderRadius: "xl", bg: "gold.200", _hover: { - bg: "opacity.grey.700.05", + bg: "transparent", + borderColor: "grey.500", }, _active: { bg: "transparent", @@ -82,8 +83,10 @@ export const buttonTheme: ComponentSingleStyleConfig = { return { ...defaultStyles, color: "red.400", - borderColor: "red.400", - bg: "transparent", + _hover: { + bg: "transparent", + borderColor: "red.400", + }, } } From 4d39f44c6f2e79f907051cbbbd647d92d0909dbd Mon Sep 17 00:00:00 2001 From: ioay Date: Wed, 31 Jan 2024 18:47:53 +0100 Subject: [PATCH 2/2] Update colorSchema for connectWallet button --- dapp/src/components/Header/ConnectWallet.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dapp/src/components/Header/ConnectWallet.tsx b/dapp/src/components/Header/ConnectWallet.tsx index f1f3546f6..038a069ff 100644 --- a/dapp/src/components/Header/ConnectWallet.tsx +++ b/dapp/src/components/Header/ConnectWallet.tsx @@ -22,7 +22,7 @@ function ConnectButton({ account, requestAccount, }: ConnectButtonsProps) { - const colorScheme = !account ? "error" : "gold" + const colorScheme = !account ? "error" : undefined const handleClick = () => { asyncWrapper(requestAccount())