2022-08-05 02:17:31 +00:00
|
|
|
import clsx from 'clsx';
|
2022-11-28 02:00:28 +00:00
|
|
|
import { PieChart } from 'lucide-react';
|
2022-08-05 02:17:31 +00:00
|
|
|
|
|
|
|
import { Icon } from '@/react/components/Icon';
|
2022-07-06 08:23:53 +00:00
|
|
|
import { humanize } from '@/portainer/filters/filters';
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
imagesTotalSize: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function useImagesTotalSizeComponent(imagesTotalSize: number) {
|
|
|
|
return <ImagesTotalSize imagesTotalSize={imagesTotalSize} />;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function ImagesTotalSize({ imagesTotalSize }: Props) {
|
|
|
|
return (
|
2022-08-05 02:17:31 +00:00
|
|
|
<div className="vertical-center">
|
2022-11-28 02:00:28 +00:00
|
|
|
<Icon icon={PieChart} className={clsx('space-right')} />
|
2022-07-06 08:23:53 +00:00
|
|
|
{humanize(imagesTotalSize)}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|