1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00
portainer/app/react/components/datatables/TableTitle.tsx
Ali 58d66d3142
chore(prettier): add tailwind prettier plugin [EE-4809] (#8221)
* add prettier plugin

* apply tailwind prettier formatting
2023-02-13 10:04:24 +13:00

37 lines
802 B
TypeScript

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