mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 00:09:40 +02:00
feat(home): change layout of env tile [EE-4479] (#8061)
This commit is contained in:
parent
b48aa1274d
commit
eba5879ec8
29 changed files with 717 additions and 445 deletions
27
app/react/components/StatsItem.tsx
Normal file
27
app/react/components/StatsItem.tsx
Normal file
|
@ -0,0 +1,27 @@
|
|||
import clsx from 'clsx';
|
||||
import { PropsWithChildren } from 'react';
|
||||
|
||||
import { Icon, IconProps } from '@/react/components/Icon';
|
||||
|
||||
interface Props extends IconProps {
|
||||
value: string | number;
|
||||
icon: IconProps['icon'];
|
||||
iconClass?: string;
|
||||
}
|
||||
|
||||
export function StatsItem({
|
||||
value,
|
||||
icon,
|
||||
children,
|
||||
iconClass,
|
||||
}: PropsWithChildren<Props>) {
|
||||
return (
|
||||
<span className="flex gap-1 items-center">
|
||||
<Icon className={clsx('icon icon-sm', iconClass)} icon={icon} />
|
||||
<span>{value}</span>
|
||||
{children && (
|
||||
<span className="ml-1 flex gap-2 items-center">{children}</span>
|
||||
)}
|
||||
</span>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue