-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathWizard.tsx
More file actions
41 lines (39 loc) · 1.04 KB
/
Copy pathWizard.tsx
File metadata and controls
41 lines (39 loc) · 1.04 KB
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
import { Inline, Stack } from '../layout';
import { Modal } from '../Modal';
import { ModalSizes } from '../Modal/Modal.enums';
import { WizardProvider } from './Wizard.context';
import { WizardProps } from './Wizard.types';
import { WizardActions } from './WizardActions';
import { WizardStepper } from './WizardStepper';
const Wizard = ({
initialStep,
size = ModalSizes.lg,
onStepChange = () => null,
onClose = undefined,
isBackwardNavigationEnabled,
children,
}: WizardProps) => {
return (
<WizardProvider
initialStep={initialStep}
isBackwardNavigationEnabled={isBackwardNavigationEnabled}
onStepChange={onStepChange}
>
<Modal size={size} onClose={onClose}>
<Stack gap="lg">
{children}
<Inline
align="center"
gap="lg"
justify="space-between"
stretch="start"
>
<WizardStepper />
<WizardActions />
</Inline>
</Stack>
</Modal>
</WizardProvider>
);
};
export default Wizard;