2022-01-04 12:16:09 +00:00
|
|
|
import { PropsWithChildren } from 'react';
|
|
|
|
|
2022-06-23 06:32:18 +00:00
|
|
|
import { Icon } from '@/react/components/Icon';
|
|
|
|
|
2022-01-04 12:16:09 +00:00
|
|
|
import { useTableContext } from './TableContainer';
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
icon: string;
|
|
|
|
label: string;
|
2022-06-23 06:32:18 +00:00
|
|
|
featherIcon?: boolean;
|
2022-01-04 12:16:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export function TableTitle({
|
|
|
|
icon,
|
2022-06-23 06:32:18 +00:00
|
|
|
featherIcon,
|
2022-01-04 12:16:09 +00:00
|
|
|
label,
|
|
|
|
children,
|
|
|
|
}: PropsWithChildren<Props>) {
|
|
|
|
useTableContext();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="toolBar">
|
|
|
|
<div className="toolBarTitle">
|
2022-07-19 03:29:50 +00:00
|
|
|
<Icon
|
|
|
|
icon={icon}
|
|
|
|
feather={featherIcon}
|
|
|
|
className="icon-nested-blue icon-primary space-right"
|
|
|
|
/>
|
2022-06-23 06:32:18 +00:00
|
|
|
|
2022-01-04 12:16:09 +00:00
|
|
|
{label}
|
|
|
|
</div>
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|