27 lines
603 B
TypeScript
27 lines
603 B
TypeScript
import clsx from 'clsx';
|
|
|
|
import { makeStyles } from '@material-ui/core/styles';
|
|
import { Toolbar, ToolbarProps } from '@material-ui/core';
|
|
|
|
export type TableToolbarProps = ToolbarProps;
|
|
|
|
const useStyles = makeStyles(theme => {
|
|
return {
|
|
toolbar: {
|
|
paddingTop: theme.spacing(1),
|
|
paddingBottom: theme.spacing(1),
|
|
},
|
|
};
|
|
});
|
|
|
|
function TableToolbar({ children, className, ...rest }: TableToolbarProps) {
|
|
const classes = useStyles();
|
|
return (
|
|
<Toolbar {...rest} className={clsx(classes.toolbar, className)}>
|
|
{children}
|
|
</Toolbar>
|
|
);
|
|
}
|
|
|
|
export default TableToolbar;
|