Pass isInteractive to each graph separately

This commit is contained in:
Hristo Nedelkov 2023-09-28 23:06:31 +03:00
parent c9f2320fc5
commit 6fff9f9feb
4 changed files with 7 additions and 7 deletions

View File

@ -61,7 +61,7 @@ const DeviceCPULoad = ({ load }: DeviceCPULoadProps) => {
}}
>
<div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>
<StandartLineChart data={chartData} />
<StandartLineChart data={chartData} isInteractive={false} />
</div>
<YStack space={'$3'}>
<Text size={15} weight={'semibold'}>

View File

@ -51,7 +51,7 @@ const DeviceMemoryHealth = ({ currentMemory, maxMemory }: DeviceMemoryHealthProp
width: '50%',
minHeight: '135px',
borderRadius: '16px',
border: message === 'Poor' ? '1px solid #D92344' : '1px solid #E0E0E0',
border: message === 'Poor' ? '1px solid #D92344' : '1px solid #E0E0E0',
backgroundColor: isHovered ? '#f8f6ff' : (message === 'Poor' ? '#fefafa' : '#fff'),
}}
onMouseEnter={() => setIsHovered(true)}
@ -66,7 +66,7 @@ const DeviceMemoryHealth = ({ currentMemory, maxMemory }: DeviceMemoryHealthProp
}}
>
<div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>
<StandartLineChart data={chartData} />
<StandartLineChart data={chartData} isInteractive={false} />
</div>
<YStack space={'$3'}>
<Text size={15} weight={'semibold'}>

View File

@ -52,7 +52,7 @@ const DeviceNetworkHealth = ({ latency }: DeviceNetworkHealthProps) => {
width: '50%',
minHeight: '135px',
borderRadius: '16px',
border: processedLatency.message === 'Poor' ? '1px solid #D92344' : '1px solid #E0E0E0',
border: processedLatency.message === 'Poor' ? '1px solid #D92344' : '1px solid #E0E0E0',
backgroundColor: isHovered ? '#f8f6ff' : (processedLatency.message === 'Poor' ? '#fefafa' : '#fff'),
}}
onMouseEnter={() => setIsHovered(true)}
@ -67,7 +67,7 @@ const DeviceNetworkHealth = ({ latency }: DeviceNetworkHealthProps) => {
}}
>
<div style={{ position: 'absolute', top: 0, left: 0, right: 0, bottom: 0 }}>
<StandartLineChart data={chartData} />
<StandartLineChart data={chartData} isInteractive={false} />
</div>
<YStack space={'$3'}>
<Text size={15} weight={'semibold'}>

View File

@ -42,7 +42,7 @@ const DeviceStorageHealth = ({ storage, maxStorage }: DeviceStorageHealthProps)
width: '50%',
minHeight: '135px',
borderRadius: '16px',
border: message === 'Poor' ? '1px solid #D92344' : '1px solid #E0E0E0',
border: message === 'Poor' ? '1px solid #D92344' : '1px solid #E0E0E0',
backgroundColor: isHovered ? '#f8f6ff' : (message === 'Poor' ? '#fefafa' : '#fff'),
}}
onMouseEnter={() => setIsHovered(true)}
@ -64,7 +64,7 @@ const DeviceStorageHealth = ({ storage, maxStorage }: DeviceStorageHealthProps)
height: '4.75rem',
}}
>
<StandardGauge data={data(free)} />
<StandardGauge data={data(free)} isInteractive={false}/>
</Stack>
<YStack space={'$3'}>
<Text size={15} weight={'semibold'}>