Commit e5cad5ba authored by tom's avatar tom

link token

parent 8a66db72
...@@ -70,15 +70,15 @@ const variantOutline = defineStyle((props) => { ...@@ -70,15 +70,15 @@ const variantOutline = defineStyle((props) => {
borderColor, borderColor,
bg: 'transparent', bg: 'transparent',
_hover: { _hover: {
color: 'blue.400', color: 'link_hovered',
borderColor: 'blue.400', borderColor: 'link_hovered',
bg: 'transparent', bg: 'transparent',
_active: { _active: {
bg: props.isActive ? activeBg : 'transparent', bg: props.isActive ? activeBg : 'transparent',
borderColor: props.isActive ? activeBg : 'blue.400', borderColor: props.isActive ? activeBg : 'link_hovered',
color: props.isActive ? activeColor : 'blue.400', color: props.isActive ? activeColor : 'link_hovered',
p: { p: {
color: 'blue.400', color: 'link_hovered',
}, },
}, },
_disabled: { _disabled: {
...@@ -86,7 +86,7 @@ const variantOutline = defineStyle((props) => { ...@@ -86,7 +86,7 @@ const variantOutline = defineStyle((props) => {
borderColor, borderColor,
}, },
p: { p: {
color: 'blue.400', color: 'link_hovered',
}, },
}, },
_disabled: { _disabled: {
...@@ -147,7 +147,7 @@ const variantSubtle = defineStyle((props) => { ...@@ -147,7 +147,7 @@ const variantSubtle = defineStyle((props) => {
bg: mode('blackAlpha.200', 'whiteAlpha.200')(props), bg: mode('blackAlpha.200', 'whiteAlpha.200')(props),
color: mode('blackAlpha.800', 'whiteAlpha.800')(props), color: mode('blackAlpha.800', 'whiteAlpha.800')(props),
_hover: { _hover: {
color: 'blue.400', color: 'link_hovered',
_disabled: { _disabled: {
color: mode('blackAlpha.800', 'whiteAlpha.800')(props), color: mode('blackAlpha.800', 'whiteAlpha.800')(props),
bg: mode('blackAlpha.200', 'whiteAlpha.200')(props), bg: mode('blackAlpha.200', 'whiteAlpha.200')(props),
...@@ -160,7 +160,7 @@ const variantSubtle = defineStyle((props) => { ...@@ -160,7 +160,7 @@ const variantSubtle = defineStyle((props) => {
bg: `${ c }.100`, bg: `${ c }.100`,
color: `${ c }.600`, color: `${ c }.600`,
_hover: { _hover: {
color: 'blue.400', color: 'link_hovered',
}, },
}; };
}); });
......
...@@ -8,9 +8,9 @@ const baseStyle = defineStyle(getDefaultTransitionProps()); ...@@ -8,9 +8,9 @@ const baseStyle = defineStyle(getDefaultTransitionProps());
const variantPrimary = defineStyle((props) => { const variantPrimary = defineStyle((props) => {
return { return {
color: mode('blue.600', 'blue.300')(props), color: 'link',
_hover: { _hover: {
color: mode('blue.400', 'blue.200')(props), color: 'link_hovered',
textDecorationStyle: props.textDecorationStyle || 'solid', textDecorationStyle: props.textDecorationStyle || 'solid',
}, },
}; };
......
...@@ -51,7 +51,7 @@ const baseStyleCloseButton = defineStyle((props) => { ...@@ -51,7 +51,7 @@ const baseStyleCloseButton = defineStyle((props) => {
height: 10, height: 10,
width: 10, width: 10,
color: mode('gray.700', 'gray.500')(props), color: mode('gray.700', 'gray.500')(props),
_hover: { color: 'blue.400' }, _hover: { color: 'link_hovered' },
_active: { bg: 'none' }, _active: { bg: 'none' },
}; };
}); });
......
...@@ -22,7 +22,7 @@ const variantSoftRounded = definePartsStyle((props) => { ...@@ -22,7 +22,7 @@ const variantSoftRounded = definePartsStyle((props) => {
}, },
}, },
_hover: { _hover: {
color: 'blue.400', color: 'link_hovered',
}, },
}, },
}; };
......
...@@ -10,10 +10,6 @@ const variantSecondary = defineStyle((props) => ({ ...@@ -10,10 +10,6 @@ const variantSecondary = defineStyle((props) => ({
color: mode('gray.500', 'gray.400')(props), color: mode('gray.500', 'gray.400')(props),
})); }));
const variantAlternate = defineStyle((props) => ({
color: mode('blue.600', 'blue.300')(props),
}));
const variantInherit = { const variantInherit = {
color: 'inherit', color: 'inherit',
}; };
...@@ -21,7 +17,6 @@ const variantInherit = { ...@@ -21,7 +17,6 @@ const variantInherit = {
const variants: Record<string, SystemStyleInterpolation> = { const variants: Record<string, SystemStyleInterpolation> = {
primary: variantPrimary, primary: variantPrimary,
secondary: variantSecondary, secondary: variantSecondary,
alternate: variantAlternate,
inherit: variantInherit, inherit: variantInherit,
}; };
......
...@@ -4,6 +4,13 @@ const semanticTokens = { ...@@ -4,6 +4,13 @@ const semanticTokens = {
'default': 'blackAlpha.200', 'default': 'blackAlpha.200',
_dark: 'whiteAlpha.200', _dark: 'whiteAlpha.200',
}, },
link: {
'default': 'blue.600',
_dark: 'blue.300',
},
link_hovered: {
'default': 'blue.400',
},
}, },
}; };
......
...@@ -7,7 +7,6 @@ import { ...@@ -7,7 +7,6 @@ import {
Icon, Icon,
Link, Link,
Text, Text,
useColorModeValue,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import React from 'react'; import React from 'react';
...@@ -43,7 +42,7 @@ const LatestBlocksItem = ({ block, h }: Props) => { ...@@ -43,7 +42,7 @@ const LatestBlocksItem = ({ block, h }: Props) => {
> >
<Flex justifyContent="space-between" alignItems="center" mb={ 3 }> <Flex justifyContent="space-between" alignItems="center" mb={ 3 }>
<HStack spacing={ 2 }> <HStack spacing={ 2 }>
<Icon as={ blockIcon } boxSize="30px" color={ useColorModeValue('blue.600', 'blue.300') }/> <Icon as={ blockIcon } boxSize="30px" color="link"/>
<Link <Link
href={ link('block', { id: String(block.height) }) } href={ link('block', { id: String(block.height) }) }
fontSize="xl" fontSize="xl"
......
...@@ -11,7 +11,6 @@ import { ...@@ -11,7 +11,6 @@ import {
PopoverTrigger, PopoverTrigger,
PopoverContent, PopoverContent,
PopoverBody, PopoverBody,
useColorModeValue,
useDisclosure, useDisclosure,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
...@@ -37,8 +36,6 @@ type Props = { ...@@ -37,8 +36,6 @@ type Props = {
} }
const LatestBlocksItem = ({ tx }: Props) => { const LatestBlocksItem = ({ tx }: Props) => {
const iconColor = useColorModeValue('blue.600', 'blue.300');
const dataTo = tx.to ? tx.to : tx.created_contract; const dataTo = tx.to ? tx.to : tx.created_contract;
const timeAgo = useTimeAgoIncrement(tx.timestamp || '0', true); const timeAgo = useTimeAgoIncrement(tx.timestamp || '0', true);
...@@ -91,7 +88,7 @@ const LatestBlocksItem = ({ tx }: Props) => { ...@@ -91,7 +88,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
as={ transactionIcon } as={ transactionIcon }
boxSize="30px" boxSize="30px"
mr={ 2 } mr={ 2 }
color={ iconColor } color="link"
/> />
<Address width="100%"> <Address width="100%">
<AddressLink <AddressLink
......
...@@ -17,7 +17,6 @@ interface Props { ...@@ -17,7 +17,6 @@ interface Props {
const AdditionalInfoButton = ({ isOpen, onClick, className }: Props, ref: React.ForwardedRef<HTMLButtonElement>) => { const AdditionalInfoButton = ({ isOpen, onClick, className }: Props, ref: React.ForwardedRef<HTMLButtonElement>) => {
const infoBgColor = useColorModeValue('blue.50', 'gray.600'); const infoBgColor = useColorModeValue('blue.50', 'gray.600');
const infoColor = useColorModeValue('blue.600', 'blue.300');
return ( return (
<Button <Button
...@@ -36,8 +35,8 @@ const AdditionalInfoButton = ({ isOpen, onClick, className }: Props, ref: React. ...@@ -36,8 +35,8 @@ const AdditionalInfoButton = ({ isOpen, onClick, className }: Props, ref: React.
<Icon <Icon
as={ infoIcon } as={ infoIcon }
boxSize={ 5 } boxSize={ 5 }
color={ infoColor } color="link"
_hover={{ color: 'blue.400' }} _hover={{ color: 'link_hovered' }}
/> />
</Button> </Button>
); );
......
import { Text, Flex, Tag, Icon, useColorModeValue } from '@chakra-ui/react'; import { Text, Flex, Tag, Icon } from '@chakra-ui/react';
import BigNumber from 'bignumber.js'; import BigNumber from 'bignumber.js';
import React from 'react'; import React from 'react';
...@@ -43,8 +43,6 @@ const TokenTransferListItem = ({ ...@@ -43,8 +43,6 @@ const TokenTransferListItem = ({
return BigNumber(total.value).div(BigNumber(10 ** Number(total.decimals))).dp(8).toFormat(); return BigNumber(total.value).div(BigNumber(10 ** Number(total.decimals))).dp(8).toFormat();
})(); })();
const iconColor = useColorModeValue('blue.600', 'blue.300');
const timeAgo = useTimeAgoIncrement(timestamp, enableTimeIncrement); const timeAgo = useTimeAgoIncrement(timestamp, enableTimeIncrement);
const addressWidth = `calc((100% - ${ baseAddress ? '50px' : '0px' }) / 2)`; const addressWidth = `calc((100% - ${ baseAddress ? '50px' : '0px' }) / 2)`;
...@@ -64,7 +62,7 @@ const TokenTransferListItem = ({ ...@@ -64,7 +62,7 @@ const TokenTransferListItem = ({
as={ transactionIcon } as={ transactionIcon }
boxSize="30px" boxSize="30px"
mr={ 2 } mr={ 2 }
color={ iconColor } color="link"
/> />
<Address width="100%"> <Address width="100%">
<AddressLink <AddressLink
......
...@@ -93,7 +93,7 @@ const NavigationDesktop = () => { ...@@ -93,7 +93,7 @@ const NavigationDesktop = () => {
width={ 6 } width={ 6 }
height={ 6 } height={ 6 }
border="1px" border="1px"
_hover={{ color: 'blue.400' }} _hover={{ color: 'link_hovered' }}
borderRadius="base" borderRadius="base"
{ ...chevronIconStyles } { ...chevronIconStyles }
transform={{ lg: isExpanded ? 'rotate(0)' : 'rotate(180deg)', xl: isCollapsed ? 'rotate(180deg)' : 'rotate(0)' }} transform={{ lg: isExpanded ? 'rotate(0)' : 'rotate(180deg)', xl: isCollapsed ? 'rotate(180deg)' : 'rotate(0)' }}
......
...@@ -5,7 +5,7 @@ export default function useColors() { ...@@ -5,7 +5,7 @@ export default function useColors() {
text: { text: {
'default': useColorModeValue('gray.600', 'gray.400'), 'default': useColorModeValue('gray.600', 'gray.400'),
active: useColorModeValue('blue.700', 'gray.50'), active: useColorModeValue('blue.700', 'gray.50'),
hover: 'blue.400', hover: 'link_hovered',
}, },
bg: { bg: {
'default': 'transparent', 'default': 'transparent',
......
...@@ -37,7 +37,7 @@ const NetworkMenuButton = ({ isMobile, isActive, onClick, className }: Props, re ...@@ -37,7 +37,7 @@ const NetworkMenuButton = ({ isMobile, isActive, onClick, className }: Props, re
height="36px" height="36px"
padding="10px" padding="10px"
color={ isActive ? iconColorMobile : defaultIconColor } color={ isActive ? iconColorMobile : defaultIconColor }
_hover={{ color: isMobile ? undefined : 'blue.400' }} _hover={{ color: isMobile ? undefined : 'link_hovered' }}
cursor="pointer" cursor="pointer"
{ ...getDefaultTransitionProps({ transitionProperty: 'margin' }) } { ...getDefaultTransitionProps({ transitionProperty: 'margin' }) }
/> />
......
...@@ -8,7 +8,7 @@ export default function useColors({ hasIcon }: {hasIcon: boolean}) { ...@@ -8,7 +8,7 @@ export default function useColors({ hasIcon }: {hasIcon: boolean}) {
text: { text: {
'default': useColorModeValue('gray.600', 'gray.400'), 'default': useColorModeValue('gray.600', 'gray.400'),
active: useColorModeValue('blackAlpha.900', 'whiteAlpha.900'), active: useColorModeValue('blackAlpha.900', 'whiteAlpha.900'),
hover: useColorModeValue('blue.600', 'blue.400'), hover: useColorModeValue('blue.600', 'link_hovered'),
}, },
icon: { icon: {
'default': hasIcon ? iconDefaultColor : iconPlaceholderDefaultColor, 'default': hasIcon ? iconDefaultColor : iconPlaceholderDefaultColor,
......
...@@ -8,7 +8,6 @@ import { ...@@ -8,7 +8,6 @@ import {
ModalContent, ModalContent,
ModalCloseButton, ModalCloseButton,
Text, Text,
useColorModeValue,
useDisclosure } from '@chakra-ui/react'; useDisclosure } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
...@@ -43,7 +42,6 @@ const ARROW_WIDTH = 24; ...@@ -43,7 +42,6 @@ const ARROW_WIDTH = 24;
const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }: Props) => { const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }: Props) => {
const { isOpen, onOpen, onClose } = useDisclosure(); const { isOpen, onOpen, onClose } = useDisclosure();
const iconColor = useColorModeValue('blue.600', 'blue.300');
const dataTo = tx.to ? tx.to : tx.created_contract; const dataTo = tx.to ? tx.to : tx.created_contract;
const isOut = Boolean(currentAddress && currentAddress === tx.from.hash); const isOut = Boolean(currentAddress && currentAddress === tx.from.hash);
...@@ -67,7 +65,7 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }: ...@@ -67,7 +65,7 @@ const TxsListItem = ({ tx, showBlockInfo, currentAddress, enableTimeIncrement }:
as={ transactionIcon } as={ transactionIcon }
boxSize="30px" boxSize="30px"
mr={ 2 } mr={ 2 }
color={ iconColor } color="link"
/> />
<Address width="100%"> <Address width="100%">
<AddressLink <AddressLink
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment