1 | import * as React from 'react';
|
2 | import { SxProps } from '@mui/system';
|
3 | import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
4 | import { Theme } from '../styles';
|
5 | import { StepClasses } from './stepClasses';
|
6 |
|
7 | export interface StepOwnProps {
|
8 | |
9 |
|
10 |
|
11 | active?: boolean;
|
12 | |
13 |
|
14 |
|
15 | children?: React.ReactNode;
|
16 | |
17 |
|
18 |
|
19 | classes?: Partial<StepClasses>;
|
20 | |
21 |
|
22 |
|
23 | completed?: boolean;
|
24 | |
25 |
|
26 |
|
27 |
|
28 | disabled?: boolean;
|
29 | |
30 |
|
31 |
|
32 |
|
33 | expanded?: boolean;
|
34 | |
35 |
|
36 |
|
37 |
|
38 | index?: number;
|
39 | |
40 |
|
41 |
|
42 |
|
43 | last?: boolean;
|
44 | |
45 |
|
46 |
|
47 | sx?: SxProps<Theme>;
|
48 | }
|
49 |
|
50 | export interface StepTypeMap<
|
51 | AdditionalProps = {},
|
52 | RootComponent extends React.ElementType = 'div',
|
53 | > {
|
54 | props: AdditionalProps & StepOwnProps;
|
55 | defaultComponent: RootComponent;
|
56 | }
|
57 |
|
58 | export type StepProps<
|
59 | RootComponent extends React.ElementType = StepTypeMap['defaultComponent'],
|
60 | AdditionalProps = { component?: React.ElementType },
|
61 | > = OverrideProps<StepTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
62 | component?: React.ElementType;
|
63 | };
|
64 |
|
65 | export type StepClasskey = keyof NonNullable<StepProps['classes']>;
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 | declare const Step: OverridableComponent<StepTypeMap>;
|
78 |
|
79 | export default Step;
|