UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

26 lines (25 loc) 1.26 kB
import { SetFloatingWindowPosition, UseFloatingWindowOptions } from '@mantine/hooks'; import { BoxProps, ElementProps, Factory, StylesApiProps } from '../../core'; import { PaperBaseProps } from '../Paper'; import { PortalProps } from '../Portal'; export type FloatingWindowStylesNames = 'root'; export interface FloatingWindowProps extends UseFloatingWindowOptions, PaperBaseProps, BoxProps, StylesApiProps<FloatingWindowFactory>, ElementProps<'div', keyof UseFloatingWindowOptions> { /** Assigns ref to set position programmatically */ setPositionRef?: React.RefObject<SetFloatingWindowPosition | null>; /** Determines whether the window should be rendered inside `Portal` @default true */ withinPortal?: boolean; /** Props passed down to `Portal` component */ portalProps?: Omit<PortalProps, 'children'>; /** `z-index` of the root element @default 400 */ zIndex?: React.CSSProperties['zIndex']; } export type FloatingWindowFactory = Factory<{ props: FloatingWindowProps; ref: HTMLDivElement; stylesNames: FloatingWindowStylesNames; }>; export declare const FloatingWindow: import("../..").MantineComponent<{ props: FloatingWindowProps; ref: HTMLDivElement; stylesNames: FloatingWindowStylesNames; }>;