UNPKG

1.62 kBTypeScriptView Raw
1import * as React from 'react';
2import { TransitionProps } from '../transitions/transition';
3
4export interface ZoomProps extends TransitionProps {
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 Zoom transition can be used for the floating variant of the
38 * [Button](https://mui.com/material-ui/react-button/#floating-action-buttons) component.
39 * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
40 *
41 * Demos:
42 *
43 * - [Transitions](https://mui.com/material-ui/transitions/)
44 *
45 * API:
46 *
47 * - [Zoom API](https://mui.com/material-ui/api/zoom/)
48 * - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition/#Transition-props)
49 */
50export default function Zoom(props: ZoomProps): React.JSX.Element;