diff --git a/examples/chain-template/components/common/Radio/Radio.module.css b/examples/chain-template/components/common/Radio/Radio.module.css index e8e19cda..8fa12ba1 100644 --- a/examples/chain-template/components/common/Radio/Radio.module.css +++ b/examples/chain-template/components/common/Radio/Radio.module.css @@ -16,7 +16,7 @@ } .radioDark { - border-color: #323a42; + border-color: #6d7987; } .radioDark:checked { diff --git a/examples/chain-template/components/common/Radio/Radio.tsx b/examples/chain-template/components/common/Radio/Radio.tsx index edca8dc8..ebba2a22 100644 --- a/examples/chain-template/components/common/Radio/Radio.tsx +++ b/examples/chain-template/components/common/Radio/Radio.tsx @@ -19,7 +19,10 @@ export const Radio = ({ onChange, }: RadioProps) => { const { theme } = useTheme(); - const color = checked ? '$purple600' : '$blackAlpha600'; + + const checkedColor = theme === 'light' ? '$purple600' : '$purple400'; + const textColor = checked ? checkedColor : '$blackAlpha600'; + const borderColor = checked ? checkedColor : '$blackAlpha200'; return ( - + {typeof icon === 'string' ? ( - + ) : ( icon )} - + {children} diff --git a/examples/chain-template/components/contract/BackButton.tsx b/examples/chain-template/components/contract/BackButton.tsx index dfcc3919..03f83193 100644 --- a/examples/chain-template/components/contract/BackButton.tsx +++ b/examples/chain-template/components/contract/BackButton.tsx @@ -10,6 +10,7 @@ export const BackButton = ({ onClick }: { onClick: () => void }) => { attributes={{ onClick }} > diff --git a/examples/chain-template/components/contract/InstantiateContract.tsx b/examples/chain-template/components/contract/InstantiateContract.tsx index 919e858f..d2af0c0a 100644 --- a/examples/chain-template/components/contract/InstantiateContract.tsx +++ b/examples/chain-template/components/contract/InstantiateContract.tsx @@ -114,6 +114,8 @@ export const InstantiateContract = ({ !canInstantiate || !!adminInputErr; + const { isMobile } = useDetectBreakpoints(); + if (txResult) { const infoItems: TxInfoItem[] = [ { @@ -174,8 +176,6 @@ export const InstantiateContract = ({ ); } - const { isMobile } = useDetectBreakpoints(); - return ( ({ image: { - src: '/images/upload.svg', + src: theme === 'light' ? '/images/upload.svg' : '/images/upload-dark.svg', alt: 'upload', width: 80, height: 48, }, title: 'Upload or drag .wasm file here', description: `Max file size: ${bytesToKb(MAX_FILE_SIZE)}KB`, -}; +}); type WasmFileUploaderProps = { file: File | null; @@ -25,6 +31,8 @@ type WasmFileUploaderProps = { }; export const WasmFileUploader = ({ file, setFile }: WasmFileUploaderProps) => { + const { theme } = useTheme(); + const onDrop = useCallback( (files: File[]) => { setFile(files[0]); @@ -33,11 +41,14 @@ export const WasmFileUploader = ({ file, setFile }: WasmFileUploaderProps) => { ); const fileInfo = useMemo(() => { - if (!file) return defaultFileInfo; + if (!file) return getDefaultFileInfo(theme); return { image: { - src: '/images/contract-file.svg', + src: + theme === 'light' + ? '/images/contract-file.svg' + : '/images/contract-file-dark.svg', alt: 'contract-file', width: 40, height: 54, @@ -45,7 +56,7 @@ export const WasmFileUploader = ({ file, setFile }: WasmFileUploaderProps) => { title: file.name, description: `File size: ${bytesToKb(file.size)}KB`, }; - }, [file]); + }, [file, theme]); const { getRootProps, getInputProps } = useDropzone({ onDrop, @@ -63,8 +74,8 @@ export const WasmFileUploader = ({ file, setFile }: WasmFileUploaderProps) => { borderRadius="8px" borderWidth="1px" borderStyle={file ? 'none' : 'dashed'} - borderColor="$purple600" - bg="$purple50" + borderColor={useColorModeValue('$purple600', '$purple400')} + bg={useColorModeValue('$purple50', '$purple900')} cursor={file ? 'auto' : 'pointer'} height="206px" position="relative" diff --git a/examples/chain-template/config/theme.ts b/examples/chain-template/config/theme.ts index 1b15014f..c712fa19 100644 --- a/examples/chain-template/config/theme.ts +++ b/examples/chain-template/config/theme.ts @@ -6,6 +6,7 @@ export const CustomTheme: Record = { }; export const lightColors: ThemeDef['vars']['colors'] = { + purple900: '#322F3C', purple600: '#7310FF', purple400: '#AB6FFF', purple200: '#E5D4FB', @@ -42,6 +43,7 @@ export const lightColors: ThemeDef['vars']['colors'] = { }; export const darkColors: ThemeDef['vars']['colors'] = { + purple900: '#322F3C', purple600: '#9042FE', purple400: '#AB6FFF', purple200: '#4D198F', diff --git a/examples/chain-template/public/images/contract-file-dark.svg b/examples/chain-template/public/images/contract-file-dark.svg new file mode 100644 index 00000000..bede0b52 --- /dev/null +++ b/examples/chain-template/public/images/contract-file-dark.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/examples/chain-template/public/images/upload-dark.svg b/examples/chain-template/public/images/upload-dark.svg new file mode 100644 index 00000000..be53406c --- /dev/null +++ b/examples/chain-template/public/images/upload-dark.svg @@ -0,0 +1,4 @@ + + + +