Skip to content

Commit 740bdbf

Browse files
committed
fix bg color issue in dark mode
1 parent 1e22195 commit 740bdbf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

templates/chain-template/pages/sign-message.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState, ChangeEvent } from 'react';
2-
import { Container, Button, Stack, Text, TextField } from '@interchain-ui/react';
2+
import { Container, Button, Stack, Text, TextField, useTheme } from '@interchain-ui/react';
33
import { useChain } from '@interchain-kit/react';
44
import { useChainStore } from '@/contexts';
55
import { useToast } from '@/hooks';
@@ -12,6 +12,7 @@ export default function SignMessage() {
1212
const { selectedChain } = useChainStore();
1313
const { address, wallet, chain } = useChain(selectedChain);
1414
const { toast } = useToast();
15+
const { theme } = useTheme();
1516

1617
const handleSign = async () => {
1718
if (!wallet || !address || !chain.chainId) {
@@ -121,7 +122,7 @@ export default function SignMessage() {
121122
<Container
122123
attributes={{
123124
p: '$16',
124-
backgroundColor: '$gray100',
125+
backgroundColor: theme === 'light' ? '$gray100' : '$gray900',
125126
borderRadius: '$md'
126127
}}
127128
>

0 commit comments

Comments
 (0)