mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-09 10:03:36 +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>
|
||||
<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> */}
|
||||
|
@ -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> */}
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user