fix: page mode shortcut (#3097)

This commit is contained in:
danielchim
2023-07-10 02:37:49 +08:00
committed by GitHub
parent 1c8895f23f
commit e06d5e1c8d
5 changed files with 39 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
import type { TooltipProps } from '@mui/material';
import { NoSsr } from '@mui/material';
import type { ReactElement } from 'react';
import { styled } from '../../styles';
import { Popper, type PopperProps } from '../popper';
@@ -18,6 +18,11 @@ const StyledTooltip = styled(StyledPopperContainer)(() => {
};
});
interface TooltipProps {
content: string | ReactElement<any, any>;
placement?: PopperProps['placement'];
children: ReactElement<any, any>;
}
export const Tooltip = (props: PopperProps & Omit<TooltipProps, 'title'>) => {
const { content, placement = 'top-start', children } = props;
return (