fix: await compatibility in #c648dc6

This commit is contained in:
dongchengjie
2024-06-26 18:29:50 +08:00
parent c648dc6c99
commit ee9462c221
2 changed files with 9 additions and 5 deletions

View File

@@ -12,11 +12,11 @@ interface Props extends IconButtonProps {
}
export const TooltipIcon: React.FC<Props> = (props: Props) => {
const { title = "", icon: Icon = InfoRounded } = props;
const { title = "", icon: Icon = InfoRounded, ...restProps } = props;
return (
<Tooltip title={title} placement="top">
<IconButton color="inherit" size="small" {...props}>
<IconButton color="inherit" size="small" {...restProps}>
<Icon fontSize="inherit" style={{ cursor: "pointer", opacity: 0.75 }} />
</IconButton>
</Tooltip>