feat: add custom weight to icon text

This commit is contained in:
RadoslavDimchev 2023-08-11 13:47:16 +03:00
parent 5fcc98ee50
commit f8793daa64
3 changed files with 11 additions and 4 deletions

View File

@ -57,7 +57,10 @@ const DeviceCPULoad: React.FC<DeviceCPULoadProps> = ({ load }) => {
</XStack>
<Separator borderColor={'#e3e3e3'} />
<XStack space={'$4'} style={{ padding: '10px 16px 10px 16px' }}>
<IconText icon={message === 'Good' ? '/icons/check-circle.png' : '/icons/alert.png'}>
<IconText
icon={message === 'Good' ? '/icons/check-circle.png' : '/icons/alert.png'}
weight={'semibold'}
>
{message}
</IconText>
{/* <Text color={'#E95460'}>This is additional text</Text> */}

View File

@ -58,7 +58,10 @@ const DeviceStorageHealth: React.FC<DeviceStorageHealthProps> = ({ storage, maxS
</XStack>
<Separator borderColor={'#e3e3e3'} />
<XStack space={'$4'} style={{ padding: '10px 16px 10px 16px' }}>
<IconText icon={message === 'Good' ? '/icons/check-circle.png' : '/icons/alert.png'}>
<IconText
icon={message === 'Good' ? '/icons/check-circle.png' : '/icons/alert.png'}
weight={'semibold'}
>
{message}
</IconText>
{/* <Text color={'#E95460'}>This is additional text</Text> */}

View File

@ -5,9 +5,10 @@ import { Text } from '@status-im/components'
type IconTextProps = {
icon: string
children: string
weight?: 'regular' | 'medium' | 'semibold'
}
const IconText = ({ icon, children }: IconTextProps) => {
const IconText = ({ icon, children, weight }: IconTextProps) => {
return (
<XStack
style={{
@ -16,7 +17,7 @@ const IconText = ({ icon, children }: IconTextProps) => {
space={'$2'}
>
<Icon src={icon} />
<Text size={11} color={'#000000'} weight={"medium"} >
<Text size={13} color={'#000000'} weight={weight}>
{children}
</Text>
</XStack>