fix: await compatibility in #8e78b9e

This commit is contained in:
dongchengjie
2024-06-26 18:29:50 +08:00
parent 8e78b9e405
commit 66ae293ddd
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>