-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
/
Step.d.ts
79 lines (73 loc) · 2.08 KB
/
Step.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import * as React from 'react';
import { SxProps } from '@mui/system';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
import { Theme } from '../styles';
import { StepClasses } from './stepClasses';
export interface StepOwnProps {
/**
* Sets the step as active. Is passed to child components.
*/
active?: boolean;
/**
* Should be `Step` sub-components such as `StepLabel`, `StepContent`.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<StepClasses>;
/**
* Mark the step as completed. Is passed to child components.
*/
completed?: boolean;
/**
* If `true`, the step is disabled, will also disable the button if
* `StepButton` is a child of `Step`. Is passed to child components.
*/
disabled?: boolean;
/**
* Expand the step.
* @default false
*/
expanded?: boolean;
/**
* The position of the step.
* The prop defaults to the value inherited from the parent Stepper component.
*/
index?: number;
/**
* If `true`, the Step is displayed as rendered last.
* The prop defaults to the value inherited from the parent Stepper component.
*/
last?: boolean;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
}
export interface StepTypeMap<
AdditionalProps = {},
RootComponent extends React.ElementType = 'div',
> {
props: AdditionalProps & StepOwnProps;
defaultComponent: RootComponent;
}
export type StepProps<
RootComponent extends React.ElementType = StepTypeMap['defaultComponent'],
AdditionalProps = { component?: React.ElementType },
> = OverrideProps<StepTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
component?: React.ElementType;
};
export type StepClasskey = keyof NonNullable<StepProps['classes']>;
/**
*
* Demos:
*
* - [Stepper](https://mui.com/material-ui/react-stepper/)
*
* API:
*
* - [Step API](https://mui.com/material-ui/api/step/)
*/
declare const Step: OverridableComponent<StepTypeMap>;
export default Step;