mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 08:09:52 +08:00
21 lines
541 B
TypeScript
21 lines
541 B
TypeScript
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;
|