2022-01-04 12:16:09 +00:00
|
|
|
import { PropsWithChildren } from 'react';
|
|
|
|
|
2022-07-26 19:44:08 +00:00
|
|
|
import { Icon, IconProps } from '@@/Icon';
|
2022-06-23 06:32:18 +00:00
|
|
|
|
2022-01-04 12:16:09 +00:00
|
|
|
import { useTableContext } from './TableContainer';
|
|
|
|
|
2022-07-26 19:44:08 +00:00
|
|
|
interface Props extends IconProps {
|
2022-01-04 12:16:09 +00:00
|
|
|
label: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
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>
|
|
|
|
);
|
|
|
|
}
|