mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-10 02:24:13 +00:00
feat: add custom weight to icon text
This commit is contained in:
parent
5fcc98ee50
commit
f8793daa64
@ -57,7 +57,10 @@ const DeviceCPULoad: React.FC<DeviceCPULoadProps> = ({ load }) => {
|
|||||||
</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' ? '/icons/check-circle.png' : '/icons/alert.png'}
|
||||||
|
weight={'semibold'}
|
||||||
|
>
|
||||||
{message}
|
{message}
|
||||||
</IconText>
|
</IconText>
|
||||||
{/* <Text color={'#E95460'}>This is additional text</Text> */}
|
{/* <Text color={'#E95460'}>This is additional text</Text> */}
|
||||||
|
@ -58,7 +58,10 @@ const DeviceStorageHealth: React.FC<DeviceStorageHealthProps> = ({ storage, maxS
|
|||||||
</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' ? '/icons/check-circle.png' : '/icons/alert.png'}
|
||||||
|
weight={'semibold'}
|
||||||
|
>
|
||||||
{message}
|
{message}
|
||||||
</IconText>
|
</IconText>
|
||||||
{/* <Text color={'#E95460'}>This is additional text</Text> */}
|
{/* <Text color={'#E95460'}>This is additional text</Text> */}
|
||||||
|
@ -5,9 +5,10 @@ import { Text } from '@status-im/components'
|
|||||||
type IconTextProps = {
|
type IconTextProps = {
|
||||||
icon: string
|
icon: string
|
||||||
children: string
|
children: string
|
||||||
|
weight?: 'regular' | 'medium' | 'semibold'
|
||||||
}
|
}
|
||||||
|
|
||||||
const IconText = ({ icon, children }: IconTextProps) => {
|
const IconText = ({ icon, children, weight }: IconTextProps) => {
|
||||||
return (
|
return (
|
||||||
<XStack
|
<XStack
|
||||||
style={{
|
style={{
|
||||||
@ -16,7 +17,7 @@ const IconText = ({ icon, children }: IconTextProps) => {
|
|||||||
space={'$2'}
|
space={'$2'}
|
||||||
>
|
>
|
||||||
<Icon src={icon} />
|
<Icon src={icon} />
|
||||||
<Text size={11} color={'#000000'} weight={"medium"} >
|
<Text size={13} color={'#000000'} weight={weight}>
|
||||||
{children}
|
{children}
|
||||||
</Text>
|
</Text>
|
||||||
</XStack>
|
</XStack>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user