1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 05:49:40 +02:00
portainer/app/react/components/datatables/TableTitle.tsx
Ali 4ee349bd6b feat(helm): helm actions [r8s-259] (#715)
Co-authored-by: James Player <james.player@portainer.io>
Co-authored-by: Cara Ryan <cara.ryan@portainer.io>
Co-authored-by: stevensbkang <skan070@gmail.com>
2025-05-13 22:15:04 +12:00

41 lines
949 B
TypeScript

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