diff --git a/src/components/DeviceStorageHealth.tsx b/src/components/DeviceStorageHealth.tsx new file mode 100644 index 00000000..e65c28d0 --- /dev/null +++ b/src/components/DeviceStorageHealth.tsx @@ -0,0 +1,71 @@ +import ShadowBox from './ShadowBox' +import IconText from './IconText' +import { Paragraph, Separator, XStack, YStack } from 'tamagui' +import StandardGauge from './StandardGauge' +interface DeviceStorageHealthProps { + storage: number + maxStorage: number +} +const DeviceStorageHealth: React.FC = ({ storage, maxStorage }) => { + const message = storage < maxStorage ? 'Good' : 'Poor' + const data = (storage: number, maxStorage: number) => { + const used = storage + const free = maxStorage - storage + + return [ + { + id: 'storage', + label: 'Used', + value: used, + color: '#E95460', + }, + { + id: 'storage', + label: 'Free', + value: free, + color: '#E7EAEE', + }, + ] + } + return ( + + + +
+ +
+ + + Storage + + + {storage} GB + + +
+ + + + {message} + + {/* This is additional text */} + +
+
+ ) +} + +export default DeviceStorageHealth diff --git a/src/components/StandardGauge.tsx b/src/components/StandardGauge.tsx index 5db9a1a6..8961fffb 100644 --- a/src/components/StandardGauge.tsx +++ b/src/components/StandardGauge.tsx @@ -14,7 +14,7 @@ interface StandardGaugeProps { const StandardGauge = ({ data }: StandardGaugeProps) => ( datum.data.color} fit={false} @@ -23,6 +23,8 @@ const StandardGauge = ({ data }: StandardGaugeProps) => ( arcLinkLabelsColor={{ from: 'color' }} enableArcLabels={false} legends={[]} + motionConfig="gentle" // Define transition style + animate={false} // Enable animation /> )