Skip to content

Commit 4633869

Browse files
committed
feat: more styling
1 parent 090abac commit 4633869

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

docs/kleros-logo-fullwhite.png

-34.5 KB
Binary file not shown.

web/src/context/Web3Provider.tsx

+15-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { configureChains, createConfig, WagmiConfig } from "wagmi";
66
import { arbitrumGoerli, gnosisChiado } from "wagmi/chains";
77
import { publicProvider } from "wagmi/providers/public";
88
import { useToggleTheme } from "hooks/useToggleThemeContext";
9+
import { useTheme } from "styled-components";
910

1011
const chains = [arbitrumGoerli, gnosisChiado];
1112
const projectId = process.env.WALLETCONNECT_PROJECT_ID ?? "6efaa26765fa742153baf9281e218217";
@@ -24,11 +25,23 @@ const wagmiConfig = createConfig({
2425
const ethereumClient = new EthereumClient(wagmiConfig, chains);
2526

2627
const Web3Provider: React.FC<{ children: React.ReactNode }> = ({ children }) => {
27-
const [theme] = useToggleTheme();
28+
const [themeToggle] = useToggleTheme();
29+
const theme = useTheme();
2830
return (
2931
<>
3032
<WagmiConfig config={wagmiConfig}> {children} </WagmiConfig>
31-
<Web3Modal themeMode={theme as "light" | "dark"} {...{ projectId, ethereumClient }} />
33+
<Web3Modal
34+
themeMode={themeToggle as "light" | "dark"}
35+
themeVariables={{
36+
"--w3m-accent-color": theme.primaryPurple,
37+
"--w3m-background-color": theme.primaryPurple,
38+
"--w3m-overlay-background-color": "rgba(0, 0, 0, 0.6)",
39+
"--w3m-overlay-backdrop-filter": "blur(3px)",
40+
"--w3m-logo-image-url": "https://github.com/kleros/kleros-v2/blob/feat(web)/wallet-connect-themes/docs/kleros-logo-white.png?raw=true",
41+
"--w3m-color-bg-1": theme.lightBackground,
42+
}}
43+
{...{ projectId, ethereumClient }}
44+
/>
3245
</>
3346
);
3447
};

0 commit comments

Comments
 (0)