UNPKG

1.16 kBTypeScriptView Raw
1import * as React from 'react';
2import { Omit, StandardProps } from '..';
3import { FadeProps } from '../Fade';
4import { TransitionProps } from '../transitions/transition';
5
6export interface BackdropProps
7 extends StandardProps<
8 React.HTMLAttributes<HTMLDivElement> & Partial<Omit<FadeProps, 'children'>>,
9 BackdropClassKey
10 > {
11 /**
12 * The content of the component.
13 */
14 children?: React.ReactNode;
15 /**
16 * If `true`, the backdrop is invisible.
17 * It can be used when rendering a popover or a custom select component.
18 */
19 invisible?: boolean;
20 /**
21 * If `true`, the backdrop is open.
22 */
23 open: boolean;
24 /**
25 * The duration for the transition, in milliseconds.
26 * You may specify a single timeout for all transitions, or individually with an object.
27 */
28 transitionDuration?: TransitionProps['timeout'];
29}
30
31export type BackdropClassKey = 'root' | 'invisible';
32
33/**
34 *
35 * Demos:
36 *
37 * - [Backdrop](https://mui.com/components/backdrop/)
38 *
39 * API:
40 *
41 * - [Backdrop API](https://mui.com/api/backdrop/)
42 * - inherits [Fade API](https://mui.com/api/fade/)
43 */
44export default function Backdrop(props: BackdropProps): JSX.Element;