UNPKG

1.3 kBTypeScriptView Raw
1import * as React from 'react';
2import { Theme } from '../styles/createTheme';
3import { TransitionProps } from '../transitions/transition';
4
5export interface SlideProps extends TransitionProps {
6 /**
7 * A single child content element.
8 */
9 children?: React.ReactElement<any, any>;
10 /**
11 * Direction the child node will enter from.
12 */
13 direction?: 'left' | 'right' | 'up' | 'down';
14 /**
15 * If `true`, show the component; triggers the enter or exit animation.
16 */
17 in?: TransitionProps['in'];
18 ref?: React.Ref<unknown>;
19 /**
20 * The duration for the transition, in milliseconds.
21 * You may specify a single timeout for all transitions, or individually with an object.
22 */
23 timeout?: TransitionProps['timeout'];
24}
25
26/**
27 * The Slide transition is used by the [Drawer](https://mui.com/components/drawers/) component.
28 * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
29 * Demos:
30 *
31 * - [Dialogs](https://mui.com/components/dialogs/)
32 * - [Transitions](https://mui.com/components/transitions/)
33 *
34 * API:
35 *
36 * - [Slide API](https://mui.com/api/slide/)
37 * - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition#Transition-props)
38 */
39export default function Slide(props: SlideProps): JSX.Element;