UNPKG

1.38 kBTypeScriptView Raw
1import * as React from 'react';
2import { Theme } from '../styles/createTheme';
3import { TransitionProps } from '../transitions/transition';
4
5export interface ZoomProps extends TransitionProps {
6 /**
7 * A single child content element.
8 */
9 children?: React.ReactElement<any, any>;
10 /**
11 * Enable this prop if you encounter 'Function components cannot be given refs',
12 * use `unstable_createStrictModeTheme`,
13 * and can't forward the ref in the child component.
14 */
15 disableStrictModeCompat?: boolean;
16 /**
17 * If `true`, the component will transition in.
18 */
19 in?: boolean;
20 ref?: React.Ref<unknown>;
21 /**
22 * The duration for the transition, in milliseconds.
23 * You may specify a single timeout for all transitions, or individually with an object.
24 */
25 timeout?: TransitionProps['timeout'];
26}
27
28/**
29 * The Zoom transition can be used for the floating variant of the
30 * [Button](https://mui.com/components/buttons/#floating-action-buttons) component.
31 * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
32 * Demos:
33 *
34 * - [Transitions](https://mui.com/components/transitions/)
35 *
36 * API:
37 *
38 * - [Zoom API](https://mui.com/api/zoom/)
39 * - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition#Transition-props)
40 */
41export default function Zoom(props: ZoomProps): JSX.Element;