feat: replace alert and check circle

This commit is contained in:
RadoslavDimchev 2023-08-21 12:34:51 +03:00
parent 8c4120383d
commit 9ff09dedba
6 changed files with 13 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 446 B

View File

@ -2,6 +2,7 @@ import StandartLineChart from './StandardLineChart'
import IconText from '../General/IconText' import IconText from '../General/IconText'
import { Paragraph, Separator, XStack, YStack } from 'tamagui' import { Paragraph, Separator, XStack, YStack } from 'tamagui'
import { Shadow, Text } from '@status-im/components' import { Shadow, Text } from '@status-im/components'
import { CheckCircleIcon, IncorrectIcon } from '@status-im/icons'
type DataPoint = { type DataPoint = {
x: number x: number
@ -49,7 +50,7 @@ const DeviceCPULoad: React.FC<DeviceCPULoadProps> = ({ load }) => {
justifyContent="space-between" justifyContent="space-between"
style={{ style={{
padding: '8px 16px', padding: '8px 16px',
position: 'relative', // Make XStack a positioning context position: 'relative',
}} }}
> >
<div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}> <div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>
@ -67,7 +68,7 @@ const DeviceCPULoad: React.FC<DeviceCPULoadProps> = ({ load }) => {
<Separator borderColor={'#e3e3e3'} /> <Separator borderColor={'#e3e3e3'} />
<XStack space={'$4'} style={{ padding: '10px 16px 10px 16px' }}> <XStack space={'$4'} style={{ padding: '10px 16px 10px 16px' }}>
<IconText <IconText
icon={message === 'Good' ? '/icons/check-circle.png' : '/icons/alert.png'} icon={message === 'Good' ? <CheckCircleIcon size={16} /> : <IncorrectIcon size={16} />}
weight={'semibold'} weight={'semibold'}
> >
{message} {message}

View File

@ -3,6 +3,7 @@ import StandartLineChart from './StandardLineChart'
import IconText from '../General/IconText' import IconText from '../General/IconText'
import { Paragraph, Separator, XStack, YStack } from 'tamagui' import { Paragraph, Separator, XStack, YStack } from 'tamagui'
import { Shadow as ShadowBox, Text } from '@status-im/components' import { Shadow as ShadowBox, Text } from '@status-im/components'
import { CheckCircleIcon, IncorrectIcon } from '@status-im/icons'
type DataPoint = { type DataPoint = {
x: number x: number
@ -70,7 +71,9 @@ const DeviceMemoryHealth = ({ currentMemory, maxMemory }: DeviceMemoryHealthProp
</XStack> </XStack>
<Separator borderColor={'#e3e3e3'} /> <Separator borderColor={'#e3e3e3'} />
<XStack space={'$4'} style={{ padding: '10px 16px 10px 16px' }}> <XStack space={'$4'} style={{ padding: '10px 16px 10px 16px' }}>
<IconText icon={message === 'Good' ? '/icons/check-circle.png' : '/icons/alert.png'}> <IconText
icon={message === 'Good' ? <CheckCircleIcon size={16} /> : <IncorrectIcon size={16} />}
>
{message} {message}
</IconText> </IconText>
{message === 'Poor' && ( {message === 'Poor' && (

View File

@ -2,6 +2,7 @@ import StandartLineChart from './StandardLineChart'
import IconText from '../General/IconText' import IconText from '../General/IconText'
import { Paragraph, Separator, XStack, YStack } from 'tamagui' import { Paragraph, Separator, XStack, YStack } from 'tamagui'
import { Shadow as ShadowBox, Text } from '@status-im/components' import { Shadow as ShadowBox, Text } from '@status-im/components'
import { CheckCircleIcon, IncorrectIcon } from '@status-im/icons'
type DataPoint = { type DataPoint = {
x: number x: number
@ -75,7 +76,9 @@ const DeviceNetworkHealth = ({ uploadRate, downloadRate }: DeviceNetworkHealthPr
</XStack> </XStack>
<Separator borderColor={'#e3e3e3'} /> <Separator borderColor={'#e3e3e3'} />
<XStack space={'$4'} style={{ padding: '10px 16px 10px 16px' }}> <XStack space={'$4'} style={{ padding: '10px 16px 10px 16px' }}>
<IconText icon={message === 'Good' ? '/icons/check-circle.png' : '/icons/alert.png'}> <IconText
icon={message === 'Good' ? <CheckCircleIcon size={16} /> : <IncorrectIcon size={16} />}
>
{message} {message}
</IconText> </IconText>
{message === 'Poor' && ( {message === 'Poor' && (

View File

@ -2,6 +2,7 @@ import IconText from '../General/IconText'
import { Paragraph, Separator, XStack, YStack } from 'tamagui' import { Paragraph, Separator, XStack, YStack } from 'tamagui'
import StandardGauge from './StandardGauge' import StandardGauge from './StandardGauge'
import { Shadow, Text } from '@status-im/components' import { Shadow, Text } from '@status-im/components'
import { CheckCircleIcon, IncorrectIcon } from '@status-im/icons'
interface DeviceStorageHealthProps { interface DeviceStorageHealthProps {
storage: number storage: number
maxStorage: number maxStorage: number
@ -69,7 +70,7 @@ const DeviceStorageHealth: React.FC<DeviceStorageHealthProps> = ({ storage, maxS
<Separator borderColor={'#e3e3e3'} /> <Separator borderColor={'#e3e3e3'} />
<XStack space={'$4'} style={{ padding: '10px 16px 10px 16px' }}> <XStack space={'$4'} style={{ padding: '10px 16px 10px 16px' }}>
<IconText <IconText
icon={message === 'Good' ? '/icons/check-circle.png' : '/icons/alert.png'} icon={message === 'Good' ? <CheckCircleIcon size={16} /> : <IncorrectIcon size={16} />}
weight={'semibold'} weight={'semibold'}
> >
{message} {message}