refactor: move component into a single package (#898)

This commit is contained in:
Himself65
2023-02-08 22:19:11 -06:00
committed by GitHub
parent 0984c37cad
commit cc605251a8
145 changed files with 9609 additions and 450 deletions
+20
View File
@@ -0,0 +1,20 @@
import { Popper, type PopperProps } from '../popper';
import { TooltipProps } from '@mui/material';
import { StyledMenuWrapper } from './styles';
export const Menu = (props: PopperProps & Omit<TooltipProps, 'title'>) => {
const { content, placement = 'bottom-start', children } = props;
return content ? (
<Popper
{...props}
showArrow={false}
content={
<StyledMenuWrapper placement={placement}>{content}</StyledMenuWrapper>
}
>
{children}
</Popper>
) : null;
};
export default Menu;