portainer/app/react/components/datatables/TableTitle.tsx

32 lines
569 B
TypeScript

import { PropsWithChildren } from 'react';
import { Icon } from '@/react/components/Icon';
import { useTableContext } from './TableContainer';
interface Props {
icon: string;
label: string;
featherIcon?: boolean;
}
export function TableTitle({
icon,
featherIcon,
label,
children,
}: PropsWithChildren<Props>) {
useTableContext();
return (
<div className="toolBar">
<div className="toolBarTitle">
<Icon icon={icon} feather={featherIcon} className="space-right" />
{label}
</div>
{children}
</div>
);
}