UNPKG

1.91 kBTypeScriptView Raw
1import * as React from 'react';
2import { SxProps } from '@mui/system';
3import { InternalStandardProps as StandardProps } from '..';
4import { Theme } from '../styles';
5import { TransitionProps } from '../transitions/transition';
6import { StepContentClasses } from './stepContentClasses';
7
8export interface StepContentProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
9 /**
10 * The content of the component.
11 */
12 children?: React.ReactNode;
13 /**
14 * Override or extend the styles applied to the component.
15 */
16 classes?: Partial<StepContentClasses>;
17 /**
18 * The system prop that allows defining system overrides as well as additional CSS styles.
19 */
20 sx?: SxProps<Theme>;
21 /**
22 * The component used for the transition.
23 * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
24 * @default Collapse
25 */
26 TransitionComponent?: React.JSXElementConstructor<
27 TransitionProps & { children: React.ReactElement<unknown, any> }
28 >;
29 /**
30 * Adjust the duration of the content expand transition.
31 * Passed as a prop to the transition component.
32 *
33 * Set to 'auto' to automatically calculate transition time based on height.
34 * @default 'auto'
35 */
36 transitionDuration?: TransitionProps['timeout'] | 'auto';
37 /**
38 * Props applied to the transition element.
39 * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
40 */
41 TransitionProps?: TransitionProps;
42}
43
44export type StepContentClasskey = keyof NonNullable<StepContentProps['classes']>;
45
46/**
47 *
48 * Demos:
49 *
50 * - [Stepper](https://mui.com/material-ui/react-stepper/)
51 *
52 * API:
53 *
54 * - [StepContent API](https://mui.com/material-ui/api/step-content/)
55 */
56export default function StepContent(props: StepContentProps): React.JSX.Element;