Skip to content

Commit

Permalink
feat(Wizard): use height token to set height
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcfaul committed May 2, 2024
1 parent 868041f commit 931cd2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/react-core/src/components/Wizard/Wizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';

import { css } from '@patternfly/react-styles';
import styles from '@patternfly/react-styles/css/components/Wizard/wizard';
import wizardHeightToken from '@patternfly/react-tokens/dist/esm/c_wizard_Height';

import {
isWizardParentStep,
Expand Down Expand Up @@ -161,7 +162,7 @@ export const Wizard = ({
<div
className={css(styles.wizard, className)}
style={{
...(height ? { height } : {}),
...(height ? { [wizardHeightToken.name]: height } : {}),
...(width ? { width } : {})
}}
{...wrapperProps}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ test(`can customize the wizard's height and width`, () => {

const wizard = screen.getByTestId('wizard-id');

expect(wizard).toHaveStyle('height: 500px');
expect(wizard).toHaveStyle('width: 500px');
});

Expand Down

0 comments on commit 931cd2c

Please sign in to comment.