You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/components/datatables/TableTitle.tsx

40 lines
761 B

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