Commit 6ec98879 authored by tom goriunov's avatar tom goriunov Committed by GitHub

Merge pull request #1947 from blockscout/fix-chart-height

Fix different heights of components with a chart
parents e2705c7e f3904581
import { Box, Flex, Skeleton, Text, useColorModeValue } from '@chakra-ui/react'; import { Flex, Skeleton, Text, useColorModeValue } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
import config from 'configs/app'; import config from 'configs/app';
...@@ -76,7 +76,7 @@ const ChainIndicators = () => { ...@@ -76,7 +76,7 @@ const ChainIndicators = () => {
const diffColor = diff >= 0 ? 'green.500' : 'red.500'; const diffColor = diff >= 0 ? 'green.500' : 'red.500';
return ( return (
<Skeleton isLoaded={ !statsQueryResult.isPlaceholderData } display="flex" alignItems="center" color={ diffColor } mt={ 2 }> <Skeleton isLoaded={ !statsQueryResult.isPlaceholderData } display="flex" alignItems="center" color={ diffColor } ml={ 2 }>
<IconSvg name="up" boxSize={ 5 } mr={ 1 } transform={ diff < 0 ? 'rotate(180deg)' : 'rotate(0)' }/> <IconSvg name="up" boxSize={ 5 } mr={ 1 } transform={ diff < 0 ? 'rotate(180deg)' : 'rotate(0)' }/>
<Text color={ diffColor } fontWeight={ 600 }>{ diff }%</Text> <Text color={ diffColor } fontWeight={ 600 }>{ diff }%</Text>
</Skeleton> </Skeleton>
...@@ -101,10 +101,10 @@ const ChainIndicators = () => { ...@@ -101,10 +101,10 @@ const ChainIndicators = () => {
<Text fontWeight={ 500 } fontFamily="heading" fontSize="lg">{ indicator?.title }</Text> <Text fontWeight={ 500 } fontFamily="heading" fontSize="lg">{ indicator?.title }</Text>
{ indicator?.hint && <Hint label={ indicator.hint } ml={ 1 }/> } { indicator?.hint && <Hint label={ indicator.hint } ml={ 1 }/> }
</Flex> </Flex>
<Box mb={ 4 }> <Flex mb={ 4 } alignItems="end">
{ valueTitle } { valueTitle }
{ valueDiff } { valueDiff }
</Box> </Flex>
<ChainIndicatorChartContainer { ...queryResult }/> <ChainIndicatorChartContainer { ...queryResult }/>
</Flex> </Flex>
{ indicators.length > 1 && ( { indicators.length > 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