Commit c39d3e98 authored by tom's avatar tom

remove unnecessary sx props

parent b5abddce
...@@ -27,7 +27,7 @@ export const ADDRESS_INFO: Address = { ...@@ -27,7 +27,7 @@ export const ADDRESS_INFO: Address = {
has_tokens: false, has_tokens: false,
has_validated_blocks: false, has_validated_blocks: false,
hash: ADDRESS_HASH, hash: ADDRESS_HASH,
implementations: [ { address: ADDRESS_HASH, name: 'Proxy' } ], implementations: [ { address: ADDRESS_HASH, name: 'Transparent Upgradable Proxy' } ],
is_contract: true, is_contract: true,
is_verified: true, is_verified: true,
name: 'ChainLink Token (goerli)', name: 'ChainLink Token (goerli)',
......
...@@ -23,11 +23,7 @@ const ERC20TokensTableItem = ({ ...@@ -23,11 +23,7 @@ const ERC20TokensTableItem = ({
return ( return (
<Tr <Tr
sx={{ role="group"
'&:hover [aria-label="Add token to wallet"]': {
opacity: 1,
},
}}
> >
<Td verticalAlign="middle"> <Td verticalAlign="middle">
<TokenEntity <TokenEntity
...@@ -46,7 +42,7 @@ const ERC20TokensTableItem = ({ ...@@ -46,7 +42,7 @@ const ERC20TokensTableItem = ({
truncation="constant" truncation="constant"
noIcon noIcon
/> />
<AddressAddToWallet token={ token } ml={ 4 } isLoading={ isLoading } opacity="0"/> <AddressAddToWallet token={ token } ml={ 4 } isLoading={ isLoading } opacity="0" _groupHover={{ opacity: 1 }}/>
</Flex> </Flex>
</Td> </Td>
<Td isNumeric verticalAlign="middle"> <Td isNumeric verticalAlign="middle">
......
...@@ -32,6 +32,7 @@ const GasTrackerPriceSnippet = ({ data, type, isLoading }: Props) => { ...@@ -32,6 +32,7 @@ const GasTrackerPriceSnippet = ({ data, type, isLoading }: Props) => {
average: useColorModeValue('gray.50', 'whiteAlpha.200'), average: useColorModeValue('gray.50', 'whiteAlpha.200'),
slow: useColorModeValue('gray.50', 'whiteAlpha.200'), slow: useColorModeValue('gray.50', 'whiteAlpha.200'),
}; };
const borderColor = useColorModeValue('gray.200', 'whiteAlpha.300');
return ( return (
<Box <Box
...@@ -41,6 +42,11 @@ const GasTrackerPriceSnippet = ({ data, type, isLoading }: Props) => { ...@@ -41,6 +42,11 @@ const GasTrackerPriceSnippet = ({ data, type, isLoading }: Props) => {
py={ 6 } py={ 6 }
w={{ lg: 'calc(100% / 3)' }} w={{ lg: 'calc(100% / 3)' }}
bgColor={ bgColors[type] } bgColor={ bgColors[type] }
_notLast={{
borderColor: borderColor,
borderRightWidth: { lg: '2px' },
borderBottomWidth: { base: '2px', lg: '0' },
}}
> >
<Skeleton textStyle="h3" isLoaded={ !isLoading } w="fit-content">{ TITLES[type] }</Skeleton> <Skeleton textStyle="h3" isLoaded={ !isLoading } w="fit-content">{ TITLES[type] }</Skeleton>
<Flex columnGap={ 3 } alignItems="center" mt={ 3 }> <Flex columnGap={ 3 } alignItems="center" mt={ 3 }>
......
...@@ -21,13 +21,6 @@ const GasTrackerPrices = ({ prices, isLoading }: Props) => { ...@@ -21,13 +21,6 @@ const GasTrackerPrices = ({ prices, isLoading }: Props) => {
borderWidth="2px" borderWidth="2px"
borderRadius="xl" borderRadius="xl"
overflow="hidden" overflow="hidden"
sx={{
'li:not(:last-child)': {
borderColor: borderColor,
borderRightWidth: { lg: '2px' },
borderBottomWidth: { base: '2px', lg: '0' },
},
}}
> >
{ prices.fast && <GasTrackerPriceSnippet type="fast" data={ prices.fast } isLoading={ isLoading }/> } { prices.fast && <GasTrackerPriceSnippet type="fast" data={ prices.fast } isLoading={ isLoading }/> }
{ prices.average && <GasTrackerPriceSnippet type="average" data={ prices.average } isLoading={ isLoading }/> } { prices.average && <GasTrackerPriceSnippet type="average" data={ prices.average } isLoading={ isLoading }/> }
......
...@@ -344,10 +344,10 @@ const SearchResultListItem = ({ data, searchTerm, isLoading }: Props) => { ...@@ -344,10 +344,10 @@ const SearchResultListItem = ({ data, searchTerm, isLoading }: Props) => {
<Text <Text
overflow="hidden" overflow="hidden"
textOverflow="ellipsis" textOverflow="ellipsis"
sx={{ style={{
WebkitLineClamp: 3,
WebkitBoxOrient: 'vertical',
display: '-webkit-box', display: '-webkit-box',
'-webkit-box-orient': 'vertical',
'-webkit-line-clamp': '3',
}} }}
> >
{ data.app.description } { data.app.description }
......
...@@ -13,11 +13,11 @@ interface Props { ...@@ -13,11 +13,11 @@ interface Props {
const NftImageFullscreen = ({ src, isOpen, onClose }: Props) => { const NftImageFullscreen = ({ src, isOpen, onClose }: Props) => {
const imgRef = React.useRef<HTMLImageElement>(null); const imgRef = React.useRef<HTMLImageElement>(null);
const [ hasDimentions, setHasDimentions ] = React.useState<boolean>(true); const [ hasDimensions, setHasDimensions ] = React.useState<boolean>(true);
const checkWidth = React.useCallback(() => { const checkWidth = React.useCallback(() => {
if (imgRef.current?.getBoundingClientRect().width === 0) { if (imgRef.current?.getBoundingClientRect().width === 0) {
setHasDimentions(false); setHasDimensions(false);
} }
}, [ ]); }, [ ]);
...@@ -30,7 +30,7 @@ const NftImageFullscreen = ({ src, isOpen, onClose }: Props) => { ...@@ -30,7 +30,7 @@ const NftImageFullscreen = ({ src, isOpen, onClose }: Props) => {
maxW="90vw" maxW="90vw"
ref={ imgRef } ref={ imgRef }
onLoad={ checkWidth } onLoad={ checkWidth }
sx={ hasDimentions ? {} : { width: '90vw', height: '90vh' } } { ...(hasDimensions ? {} : { width: '90vw', height: '90vh' }) }
/> />
</NftMediaFullscreenModal> </NftMediaFullscreenModal>
); );
......
...@@ -56,6 +56,7 @@ const NavigationDesktop = () => { ...@@ -56,6 +56,7 @@ const NavigationDesktop = () => {
return ( return (
<Flex <Flex
display={{ base: 'none', lg: 'flex' }} display={{ base: 'none', lg: 'flex' }}
role="group"
position="relative" position="relative"
flexDirection="column" flexDirection="column"
alignItems="stretch" alignItems="stretch"
...@@ -65,11 +66,6 @@ const NavigationDesktop = () => { ...@@ -65,11 +66,6 @@ const NavigationDesktop = () => {
py={ 12 } py={ 12 }
width={{ lg: isExpanded ? '229px' : '92px', xl: isCollapsed ? '92px' : '229px' }} width={{ lg: isExpanded ? '229px' : '92px', xl: isCollapsed ? '92px' : '229px' }}
{ ...getDefaultTransitionProps({ transitionProperty: 'width, padding' }) } { ...getDefaultTransitionProps({ transitionProperty: 'width, padding' }) }
sx={{
'&:hover #expand-icon': {
display: 'block',
},
}}
onClick={ handleContainerClick } onClick={ handleContainerClick }
> >
<TestnetBadge position="absolute" pl={ 3 } w="49px" top="34px"/> <TestnetBadge position="absolute" pl={ 3 } w="49px" top="34px"/>
...@@ -125,8 +121,8 @@ const NavigationDesktop = () => { ...@@ -125,8 +121,8 @@ const NavigationDesktop = () => {
cursor="pointer" cursor="pointer"
onClick={ handleTogglerClick } onClick={ handleTogglerClick }
aria-label="Expand/Collapse menu" aria-label="Expand/Collapse menu"
id="expand-icon"
display="none" display="none"
_groupHover={{ display: 'block' }}
/> />
</Flex> </Flex>
); );
......
...@@ -48,10 +48,10 @@ const SearchBarSuggestApp = ({ data, isMobile, searchTerm, onClick }: Props) => ...@@ -48,10 +48,10 @@ const SearchBarSuggestApp = ({ data, isMobile, searchTerm, onClick }: Props) =>
variant="secondary" variant="secondary"
overflow="hidden" overflow="hidden"
textOverflow="ellipsis" textOverflow="ellipsis"
sx={{ style={{
WebkitLineClamp: 3,
WebkitBoxOrient: 'vertical',
display: '-webkit-box', display: '-webkit-box',
'-webkit-box-orient': 'vertical',
'-webkit-line-clamp': '3',
}} }}
> >
{ data.description } { data.description }
......
...@@ -100,7 +100,7 @@ const TokenDetails = ({ tokenQuery }: Props) => { ...@@ -100,7 +100,7 @@ const TokenDetails = ({ tokenQuery }: Props) => {
<Grid <Grid
columnGap={ 8 } columnGap={ 8 }
rowGap={{ base: 1, lg: 3 }} rowGap={{ base: 1, lg: 3 }}
templateColumns={{ base: 'minmax(0, 1fr)', lg: 'auto minmax(728px, auto)' }} overflow="hidden" templateColumns={{ base: 'minmax(0, 1fr)', lg: 'auto minmax(0, 1fr)' }} overflow="hidden"
> >
{ exchangeRate && ( { exchangeRate && (
<> <>
......
...@@ -54,11 +54,7 @@ const TokensTableItem = ({ ...@@ -54,11 +54,7 @@ const TokensTableItem = ({
return ( return (
<Tr <Tr
sx={{ role="group"
'&:hover [aria-label="Add token to wallet"]': {
opacity: 1,
},
}}
> >
<Td> <Td>
<Flex alignItems="flex-start"> <Flex alignItems="flex-start">
...@@ -94,6 +90,7 @@ const TokensTableItem = ({ ...@@ -94,6 +90,7 @@ const TokensTableItem = ({
isLoading={ isLoading } isLoading={ isLoading }
iconSize={ 5 } iconSize={ 5 }
opacity={ 0 } opacity={ 0 }
_groupHover={{ opacity: 1 }}
/> />
</Flex> </Flex>
<Flex columnGap={ 1 }> <Flex columnGap={ 1 }>
......
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