1 | import * as React from 'react';
|
2 | import { SxProps } from '@mui/system';
|
3 | import { InternalStandardProps as StandardProps, Theme } from '..';
|
4 | import { TransitionProps } from '../transitions/transition';
|
5 | import { CollapseClasses } from './collapseClasses';
|
6 |
|
7 | export interface CollapseProps extends StandardProps<TransitionProps, 'timeout'> {
|
8 | /**
|
9 | * The content node to be collapsed.
|
10 | */
|
11 | children?: React.ReactNode;
|
12 | className?: string;
|
13 | /**
|
14 | * Override or extend the styles applied to the component.
|
15 | */
|
16 | classes?: Partial<CollapseClasses>;
|
17 | /**
|
18 | * The width (horizontal) or height (vertical) of the container when collapsed.
|
19 | * @default '0px'
|
20 | */
|
21 | collapsedSize?: string | number;
|
22 | /**
|
23 | * The component used for the root node.
|
24 | * Either a string to use a HTML element or a component.
|
25 | */
|
26 | component?: React.ElementType<TransitionProps>;
|
27 | /**
|
28 | * The transition timing function.
|
29 | * You may specify a single easing or a object containing enter and exit values.
|
30 | */
|
31 | easing?: TransitionProps['easing'];
|
32 | /**
|
33 | * If `true`, the component will transition in.
|
34 | */
|
35 | in?: boolean;
|
36 | /**
|
37 | * The transition orientation.
|
38 | * @default 'vertical'
|
39 | */
|
40 | orientation?: 'horizontal' | 'vertical';
|
41 | /**
|
42 | * The duration for the transition, in milliseconds.
|
43 | * You may specify a single timeout for all transitions, or individually with an object.
|
44 | *
|
45 | * Set to 'auto' to automatically calculate transition time based on height.
|
46 | * @default duration.standard
|
47 | */
|
48 | timeout?: TransitionProps['timeout'] | 'auto';
|
49 | /**
|
50 | * The system prop that allows defining system overrides as well as additional CSS styles.
|
51 | */
|
52 | sx?: SxProps<Theme>;
|
53 | }
|
54 |
|
55 | /**
|
56 | * The Collapse transition is used by the
|
57 | * [Vertical Stepper](https://mui.com/material-ui/react-stepper/#vertical-stepper) StepContent component.
|
58 | * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
59 | *
|
60 | * Demos:
|
61 | *
|
62 | * - [Card](https://mui.com/material-ui/react-card/)
|
63 | * - [Lists](https://mui.com/material-ui/react-list/)
|
64 | * - [Transitions](https://mui.com/material-ui/transitions/)
|
65 | *
|
66 | * API:
|
67 | *
|
68 | * - [Collapse API](https://mui.com/material-ui/api/collapse/)
|
69 | * - inherits [Transition API](https://reactcommunity.org/react-transition-group/transition/#Transition-props)
|
70 | */
|
71 |
|
72 | export default function Collapse(props: CollapseProps): React.JSX.Element;
|