Skip to content

Commit 0854733

Browse files
committed
fix nits
1 parent 2e93c7b commit 0854733

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

packages/wizard/src/Wizard/Wizard.styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { css } from '@leafygreen-ui/emotion';
2+
import { spacing } from '@leafygreen-ui/tokens';
23

34
export const wizardContainerStyles = css`
45
width: 100%;
56
height: 100%;
67
display: flex;
78
flex-direction: column;
8-
gap: 24px;
9-
outline: 1px solid red;
9+
gap: ${spacing[600]}px;
1010
`;
1111

1212
export const stepContentStyles = css`

packages/wizard/src/Wizard/Wizard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import React, { Children, isValidElement } from 'react';
33
import { Direction } from '@leafygreen-ui/descendants';
44
import { findChild } from '@leafygreen-ui/lib';
55

6-
import { WIZARD_FOOTER_KEY } from '../constants';
76
import { useWizardControlledValue } from '../utils/useWizardControlledValue/useWizardControlledValue';
87
import { WizardContext } from '../WizardContext/WizardContext';
98
import { WizardFooter } from '../WizardFooter';
109
import { WizardStep } from '../WizardStep';
1110

1211
import { stepContentStyles, wizardContainerStyles } from './Wizard.styles';
1312
import { WizardProps } from './Wizard.types';
13+
import { WizardSubComponentProperties } from '../constants';
1414

1515
export function Wizard({
1616
activeStep: activeStepProp,
@@ -50,7 +50,7 @@ export function Wizard({
5050
onStepChange?.(getNextStep(activeStep));
5151
};
5252

53-
const footerChild = findChild(children, WIZARD_FOOTER_KEY);
53+
const footerChild = findChild(children, WizardSubComponentProperties.Footer);
5454

5555
// Get the current step to render
5656
const currentStep = stepChildren[activeStep] || null;

packages/wizard/src/WizardFooter/WizardFooter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import React, { MouseEventHandler } from 'react';
33
import { Direction } from '@leafygreen-ui/descendants';
44
import FormFooter from '@leafygreen-ui/form-footer';
55

6-
import { WIZARD_FOOTER_KEY } from '../constants';
76
import { useWizardContext } from '../WizardContext/WizardContext';
87

98
import { WizardFooterProps } from './WizardFooter.types';
9+
import { WizardSubComponentProperties } from '../constants';
1010

1111
export const WizardFooter = ({
1212
backButtonProps,
@@ -45,4 +45,4 @@ export const WizardFooter = ({
4545
};
4646

4747
WizardFooter.displayName = 'WizardFooter';
48-
WizardFooter[WIZARD_FOOTER_KEY] = true;
48+
WizardFooter[WizardSubComponentProperties.Footer] = true;

packages/wizard/src/constants.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
export const WIZARD_STEP_KEY = 'isWizardStep';
2-
export const WIZARD_FOOTER_KEY = 'isWizardFooter';
1+
export const WizardSubComponentProperties = {
2+
Step: 'isWizardStep',
3+
Footer: 'isWizardFooter',
4+
} as const;
5+
export type WizardSubComponentProperties =
6+
(typeof WizardSubComponentProperties)[keyof typeof WizardSubComponentProperties];

0 commit comments

Comments
 (0)