@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
34 lines • 1.58 kB
TypeScript
import React from 'react';
import { DefaultProps, MantineNumberSize } from '../../../theme';
import { MantineTransition } from '../../Transition/Transition';
import useStyles from './MenuBody.styles';
export declare type MenuBodyStylesNames = keyof ReturnType<typeof useStyles>;
export interface MenuBodyProps extends DefaultProps<MenuBodyStylesNames>, React.ComponentPropsWithoutRef<'div'> {
/** When true menu is mounted to the dom */
opened: boolean;
/** Triggers when menu is closed */
onClose(): void;
/** <MenuItem /> and <Divider /> components only */
children: React.ReactNode;
/** Transition styles */
transition?: MantineTransition;
/** Transitions duration in ms */
transitionDuration?: number;
/** Transition timing function */
transitionTimingFunction?: string;
/** Predefined menu width or number for width in px */
size?: MantineNumberSize;
/** Predefined shadow from theme or box-shadow value */
shadow?: string;
/** Should menu close on outside click */
closeOnClickOutside?: boolean;
/** Should menu close on item click */
closeOnItemClick?: boolean;
/** Menu body z-index */
zIndex?: number;
}
export declare function MenuBody({ className, style, themeOverride, opened, onClose, transition, transitionDuration, transitionTimingFunction, children, size, shadow, closeOnClickOutside, closeOnItemClick, zIndex, classNames, styles, ...others }: MenuBodyProps): JSX.Element;
export declare namespace MenuBody {
var displayName: string;
}
//# sourceMappingURL=MenuBody.d.ts.map