1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 21:39:40 +02:00
portainer/app/react/kubernetes/namespaces/components/ResourceUsageItem.tsx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
675 B
TypeScript
Raw Normal View History

import { ProgressBar } from '@@/ProgressBar';
import { FormControl } from '@@/form-components/FormControl';
interface ResourceUsageItemProps {
value: number;
total: number;
annotation?: React.ReactNode;
label: string;
}
export function ResourceUsageItem({
value,
total,
annotation,
label,
}: ResourceUsageItemProps) {
return (
<FormControl label={label}>
<div className="flex items-center gap-2 mt-1">
<ProgressBar
steps={[
{
value,
},
]}
total={total}
/>
<div className="text-xs flex shrink-0">{annotation}</div>
</div>
</FormControl>
);
}