1 | import * as React from 'react';
|
2 | import { TransitionProps } from '../transitions/transition';
|
3 |
|
4 | export interface FadeProps extends Omit<TransitionProps, 'children'> {
|
5 | /**
|
6 | * Perform the enter transition when it first mounts if `in` is also `true`.
|
7 | * Set this to `false` to disable this behavior.
|
8 | * @default true
|
9 | */
|
10 | appear?: boolean;
|
11 | /**
|
12 | * A single child content element.
|
13 | */
|
14 | children: React.ReactElement<unknown, any>;
|
15 | /**
|
16 | * The transition timing function.
|
17 | * You may specify a single easing or a object containing enter and exit values.
|
18 | */
|
19 | easing?: TransitionProps['easing'];
|
20 | /**
|
21 | * If `true`, the component will transition in.
|
22 | */
|
23 | in?: boolean;
|
24 | ref?: React.Ref<unknown>;
|
25 | /**
|
26 | * The duration for the transition, in milliseconds.
|
27 | * You may specify a single timeout for all transitions, or individually with an object.
|
28 | * @default {
|
29 | * enter: theme.transitions.duration.enteringScreen,
|
30 | * exit: theme.transitions.duration.leavingScreen,
|
31 | * }
|
32 | */
|
33 | timeout?: TransitionProps['timeout'];
|
34 | }
|
35 |
|
36 | /**
|
37 | * The Fade transition is used by the [Modal](https://mui.com/material-ui/react-modal/) component.
|
38 | * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
39 | *
|
40 | * Demos:
|
41 | *
|
42 | * - [Transitions](https://mui.com/material-ui/transitions/)
|
43 | *
|
44 | * API:
|
45 | *
|
46 | * - [Fade API](https://mui.com/material-ui/api/fade/)
|
47 | * - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition/#Transition-props)
|
48 | */
|
49 | export default function Fade(props: FadeProps): React.JSX.Element;
|