Update CPUCard Shadow
This commit is contained in:
parent
5cdb4d247b
commit
3bf280fa4f
|
@ -1,10 +1,11 @@
|
|||
import { Paragraph, Separator, XStack, YStack } from 'tamagui'
|
||||
import { Paragraph, Separator, Stack, XStack, YStack } from 'tamagui'
|
||||
import { Shadow, Text } from '@status-im/components'
|
||||
import { IncorrectIcon } from '@status-im/icons'
|
||||
|
||||
import StandartLineChart from '../../../components/Charts/StandardLineChart'
|
||||
import IconText from '../../../components/General/IconText'
|
||||
import Icon from '../../../components/General/Icon'
|
||||
import DashboardCardWrapper from '../DashboardCardWrapper'
|
||||
|
||||
type DataPoint = {
|
||||
x: number
|
||||
|
@ -38,18 +39,14 @@ const CPUCard = ({ load }: CPUCardProps) => {
|
|||
const message = currentLoad < 80 ? 'Good' : 'Poor'
|
||||
|
||||
return (
|
||||
<Shadow
|
||||
variant="$2"
|
||||
style={{
|
||||
|
||||
borderRadius: '16px',
|
||||
border: message === 'Poor' ? '1px solid #D92344' : 'none',
|
||||
backgroundColor: message === 'Poor' ? '#fefafa' : '#fff',
|
||||
}}
|
||||
>
|
||||
<DashboardCardWrapper padding='0'>
|
||||
<YStack style={{
|
||||
width: '284px',
|
||||
height: '136px',
|
||||
borderRadius: '16px',
|
||||
border: message === 'Poor' ? '1px solid #D92344' : 'none',
|
||||
backgroundColor: message === 'Poor' ? '#fefafa' : '#fff',
|
||||
|
||||
}}>
|
||||
<XStack
|
||||
justifyContent="space-between"
|
||||
|
@ -58,9 +55,9 @@ const CPUCard = ({ load }: CPUCardProps) => {
|
|||
position: 'relative',
|
||||
}}
|
||||
>
|
||||
<div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>
|
||||
<Stack style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>
|
||||
<StandartLineChart data={chartData} />
|
||||
</div>
|
||||
</Stack>
|
||||
<YStack space={'$3'}>
|
||||
<Paragraph color={'#09101C'} size={'$6'} fontWeight={'600'}>
|
||||
CPU
|
||||
|
@ -91,7 +88,7 @@ const CPUCard = ({ load }: CPUCardProps) => {
|
|||
)}
|
||||
</XStack>
|
||||
</YStack>
|
||||
</Shadow>
|
||||
</DashboardCardWrapper>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Paragraph, Separator, Stack, XStack, YStack } from 'tamagui'
|
||||
import { Shadow as ShadowBox, Text } from '@status-im/components'
|
||||
import { Text } from '@status-im/components'
|
||||
import { CheckCircleIcon, IncorrectIcon } from '@status-im/icons'
|
||||
|
||||
import StandartLineChart from '../../../components/Charts/StandardLineChart'
|
||||
|
@ -24,6 +24,7 @@ type MemoryCardProps = {
|
|||
}
|
||||
|
||||
const MemoryCard = ({ currentMemory, maxMemory }: MemoryCardProps) => {
|
||||
|
||||
const chartData: ChartData[] = [
|
||||
{
|
||||
id: 'cpu',
|
||||
|
@ -68,7 +69,9 @@ const MemoryCard = ({ currentMemory, maxMemory }: MemoryCardProps) => {
|
|||
</Paragraph>
|
||||
</YStack>
|
||||
</XStack>
|
||||
|
||||
<Separator borderColor={'#e3e3e3'} />
|
||||
|
||||
<XStack space={'$4'} style={{ padding: '10px 16px 10px 16px' }}>
|
||||
<IconText
|
||||
icon={message === 'Good' ? <CheckCircleIcon size={16} /> : <IncorrectIcon size={16} />}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Paragraph, Separator, Stack, XStack, YStack } from 'tamagui'
|
||||
import { Shadow as ShadowBox, Text } from '@status-im/components'
|
||||
import { Text } from '@status-im/components'
|
||||
import { CheckCircleIcon, IncorrectIcon } from '@status-im/icons'
|
||||
|
||||
import StandartLineChart from '../../../components/Charts/StandardLineChart'
|
||||
|
@ -23,6 +23,7 @@ type NetworkCardProps = {
|
|||
}
|
||||
|
||||
const NetworkCard = ({ uploadRate, downloadRate }: NetworkCardProps) => {
|
||||
|
||||
const chartData: ChartData[] = [
|
||||
{
|
||||
id: 'uploadRate',
|
||||
|
|
Loading…
Reference in New Issue