1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00
portainer/app/react/components/datatables/TableTitle.tsx
Ali d78b762f7b
refactor(icons): replace fa icons [EE-4459] (#7907)
refactor(icons): remove fontawesome EE-4459

refactor(icon) replace feather with lucide EE-4472
2022-11-28 15:00:28 +13:00

34 lines
723 B
TypeScript

import { ComponentType, PropsWithChildren, ReactNode } from 'react';
import { Icon } from '@@/Icon';
interface Props {
icon?: ReactNode | ComponentType<unknown>;
label: string;
description?: ReactNode;
}
export function TableTitle({
icon,
label,
children,
description,
}: PropsWithChildren<Props>) {
return (
<div className="toolBar flex-col">
<div className="flex gap-1 p-0 w-full items-center">
<div className="toolBarTitle">
{icon && (
<div className="widget-icon">
<Icon icon={icon} className="space-right" />
</div>
)}
{label}
</div>
{children}
</div>
{description}
</div>
);
}