Add additional data about statistic boxes
This commit is contained in:
parent
d11062c6f2
commit
90da64e5bf
|
@ -1,4 +1,4 @@
|
||||||
import { H3, H4, Separator, Text, XStack, YStack } from "tamagui";
|
import { H3, H4, Paragraph, Separator, Text, XStack, YStack } from "tamagui";
|
||||||
import { IconText } from "../../../../components/IconText/IconText";
|
import { IconText } from "../../../../components/IconText/IconText";
|
||||||
import { ShadowBox } from "../../../../components/ShadowBox";
|
import { ShadowBox } from "../../../../components/ShadowBox";
|
||||||
|
|
||||||
|
@ -8,16 +8,22 @@ const StatisticBox = ({
|
||||||
stateIcon,
|
stateIcon,
|
||||||
stateText,
|
stateText,
|
||||||
additionalStateText,
|
additionalStateText,
|
||||||
|
children,
|
||||||
...props
|
...props
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<ShadowBox {...props}>
|
<ShadowBox {...props}>
|
||||||
<YStack>
|
<YStack>
|
||||||
<XStack space={"$6"}>
|
<XStack space={"$4"}>
|
||||||
<YStack space={"$2"} style={{ padding: "8px 16px" }}>
|
<YStack space={"$2"} style={{ padding: "8px 16px" }}>
|
||||||
<H4 color={"#09101C"}>{title}</H4>
|
<Paragraph color={"#09101C"} size={"$6"} fontWeight={"600"}>
|
||||||
<H3 color={"#09101C"}>{memory}</H3>
|
{title}
|
||||||
|
</Paragraph>
|
||||||
|
<Paragraph color={"#09101C"} size={"$8"} fontWeight={"700"}>
|
||||||
|
{memory}
|
||||||
|
</Paragraph>
|
||||||
</YStack>
|
</YStack>
|
||||||
|
{children !== undefined ? children : null}
|
||||||
</XStack>
|
</XStack>
|
||||||
<Separator borderColor={"#e3e3e3"} marginVertical={5} />
|
<Separator borderColor={"#e3e3e3"} marginVertical={5} />
|
||||||
<XStack space={"$4"} style={{ padding: "5px 16px 10px 16px" }}>
|
<XStack space={"$4"} style={{ padding: "5px 16px 10px 16px" }}>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { XStack, YStack } from "tamagui";
|
import { Image, Paragraph, XStack, YStack } from "tamagui";
|
||||||
import { StatisticBox } from "./StatisticBox/StatisticBox";
|
import { StatisticBox } from "./StatisticBox/StatisticBox";
|
||||||
|
import { Icon } from "../../../components/Icon";
|
||||||
|
|
||||||
const StatisticBoxes = () => {
|
const StatisticBoxes = () => {
|
||||||
return (
|
return (
|
||||||
|
@ -15,7 +16,16 @@ const StatisticBoxes = () => {
|
||||||
stateIcon="/icons/warning.png"
|
stateIcon="/icons/warning.png"
|
||||||
stateText="Poor"
|
stateText="Poor"
|
||||||
additionalStateText="86% Utilization"
|
additionalStateText="86% Utilization"
|
||||||
/>
|
>
|
||||||
|
<XStack space={"$2"}>
|
||||||
|
<Image
|
||||||
|
source={{ uri: "/icons/storage-circle.png" }}
|
||||||
|
width={75}
|
||||||
|
height={75}
|
||||||
|
/>
|
||||||
|
<Icon source={"/icons/alert.png"} />
|
||||||
|
</XStack>
|
||||||
|
</StatisticBox>
|
||||||
<StatisticBox
|
<StatisticBox
|
||||||
title="CPU"
|
title="CPU"
|
||||||
memory="30 GB"
|
memory="30 GB"
|
||||||
|
@ -35,7 +45,12 @@ const StatisticBoxes = () => {
|
||||||
memory="30 GB"
|
memory="30 GB"
|
||||||
stateIcon="/icons/active.png"
|
stateIcon="/icons/active.png"
|
||||||
stateText="Fair"
|
stateText="Fair"
|
||||||
/>
|
>
|
||||||
|
<YStack space={"$2"}>
|
||||||
|
<Paragraph color={"black"}>Uptime</Paragraph>
|
||||||
|
<Paragraph color={"black"}>23:20:02</Paragraph>
|
||||||
|
</YStack>
|
||||||
|
</StatisticBox>
|
||||||
</XStack>
|
</XStack>
|
||||||
</YStack>
|
</YStack>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue