Skip to content

Commit

Permalink
Adjust colors for redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtenz committed Jan 29, 2025
1 parent 701b349 commit 920851a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 94 deletions.
39 changes: 0 additions & 39 deletions src/assets/metamask-logo.svg

This file was deleted.

20 changes: 13 additions & 7 deletions src/components/MetaMaskLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { BoxProps } from '@chakra-ui/react';
import { Box, useColorMode } from '@chakra-ui/react';
import { Box } from '@chakra-ui/react';
import type { FunctionComponent } from 'react';

import Logo from '../assets/metamask-logo.svg';
import Logo from '../assets/logo.svg';

export type MetaMaskLogoProps = BoxProps;

Expand All @@ -13,12 +13,18 @@ export type MetaMaskLogoProps = BoxProps;
* @returns A React component.
*/
export const MetaMaskLogo: FunctionComponent<MetaMaskLogoProps> = (props) => {
const { colorMode } = useColorMode();

const fill = colorMode === 'light' ? '#161616' : 'white';
return (
<Box height="2.5rem" {...props}>
<Logo role="img" aria-label="MetaMask" fill={fill} />
<Box {...props}>
<Box
// @ts-expect-error - SVG is a React component but TypeScript thinks
// it's a string.
as={Logo}
role="img"
width="8.125rem"
height="4.038rem"
aria-label="MetaMask"
fill="primary.alternative"
/>
</Box>
);
};
Loading

0 comments on commit 920851a

Please sign in to comment.