mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 17:16:16 +08:00
25 lines
603 B
TypeScript
25 lines
603 B
TypeScript
import type { CSSProperties } from 'react';
|
|
|
|
import type { PurePopperProps } from '../popper';
|
|
import { PurePopper } from '../popper';
|
|
import { StyledMenuWrapper } from './styles';
|
|
|
|
export type PureMenuProps = PurePopperProps & {
|
|
width?: CSSProperties['width'];
|
|
height?: CSSProperties['height'];
|
|
};
|
|
export const PureMenu = ({
|
|
children,
|
|
placement,
|
|
width,
|
|
...otherProps
|
|
}: PureMenuProps) => {
|
|
return (
|
|
<PurePopper placement={placement} {...otherProps}>
|
|
<StyledMenuWrapper width={width} placement={placement}>
|
|
{children}
|
|
</StyledMenuWrapper>
|
|
</PurePopper>
|
|
);
|
|
};
|