import React from "react"; import { InferResponseType } from "hono/client"; import api from "@/lib/api"; import Text from "@ui/Text"; import Box from "@ui/Box"; import DriveIcon from "@/assets/icons/harddrive.svg"; import { HStack, VStack } from "@ui/Stack"; type Props = { data: InferResponseType; }; const Storage = ({ data }: Props) => { return ( <> Storage {data?.storage.map((item) => ( {item.mount} {`Total: ${item.total}`} {`Free: ${item.free}`} 90 ? "bg-red-500" : item.percent > 75 ? "bg-yellow-500" : "bg-primary-400", ]} style={{ width: `${item.percent}%` }} > ))} ); }; export default Storage;