@@ -16,7 +16,9 @@ const Modal = ({ children, container, inModal }) =>
16
16
inModal
17
17
? createPortal (
18
18
< Backdrop >
19
- < Bullseye > { children } </ Bullseye >
19
+ < Bullseye >
20
+ < div className = "pf-c-modal-box pf-m-lg" > { children } </ div >
21
+ </ Bullseye >
20
22
</ Backdrop > ,
21
23
container
22
24
)
@@ -29,9 +31,6 @@ const WizardInternal = ({
29
31
description,
30
32
buttonLabels,
31
33
buttonsClassName,
32
- setFullWidth,
33
- setFullHeight,
34
- isCompactNav,
35
34
showTitles,
36
35
formOptions,
37
36
currentStep,
@@ -44,7 +43,15 @@ const WizardInternal = ({
44
43
activeStepIndex,
45
44
maxStepIndex,
46
45
isDynamic,
47
- container
46
+ container,
47
+ hideClose,
48
+ titleId,
49
+ descriptionId,
50
+ closeButtonAriaLabel,
51
+ hasNoBodyPadding,
52
+ prevSteps,
53
+ navAriaLabel,
54
+ ...rest
48
55
} ) => {
49
56
const [ state , dispatch ] = useReducer ( reducer , { loading : true , container } ) ;
50
57
@@ -76,43 +83,55 @@ const WizardInternal = ({
76
83
return (
77
84
< Modal inModal = { inModal } container = { state . container } >
78
85
< div
79
- className = { `pf-c-wizard ${ inModal ? '' : 'no-shadow' } ${ isCompactNav ? 'pf-m-compact-nav' : '' } ${ setFullWidth ? 'pf-m-full-width' : '' } ${
80
- setFullHeight ? 'pf-m-full-height' : ''
81
- } `}
86
+ className = { `pf-c-wizard ${ inModal ? '' : 'no-shadow' } ` }
82
87
role = "dialog"
83
88
aria-modal = { inModal ? 'true' : undefined }
84
89
onKeyDown = { onKeyDown }
90
+ { ...rest }
85
91
>
86
- { title && < WizardHeader title = { title } description = { description } onClose = { formOptions . onCancel } /> }
87
- < div className = "pf-c-wizard__outer-wrap" >
88
- < WizardNav >
89
- < FormSpy subscription = { { values : true , valid : true , validating : true } } >
90
- { ( { values, valid, validating } ) => (
91
- < WizardNavigation
92
- navSchema = { navSchema }
93
- activeStepIndex = { activeStepIndex }
94
- valid = { valid }
95
- maxStepIndex = { maxStepIndex }
96
- jumpToStep = { jumpToStep }
97
- crossroads = { crossroads }
98
- isDynamic = { isDynamic }
99
- values = { values }
100
- setPrevSteps = { setPrevSteps }
101
- validating = { validating }
102
- />
103
- ) }
104
- </ FormSpy >
105
- </ WizardNav >
106
- < WizardStep
107
- { ...currentStep }
108
- formOptions = { formOptions }
109
- buttonLabels = { buttonLabels }
110
- buttonsClassName = { buttonsClassName }
111
- showTitles = { showTitles }
112
- handleNext = { ( nextStep ) => handleNext ( nextStep ) }
113
- handlePrev = { handlePrev }
114
- disableBack = { activeStepIndex === 0 }
92
+ { title && (
93
+ < WizardHeader
94
+ title = { title }
95
+ description = { description }
96
+ onClose = { formOptions . onCancel }
97
+ hideClose = { hideClose }
98
+ titleId = { titleId }
99
+ descriptionId = { descriptionId }
100
+ closeButtonAriaLabel = { closeButtonAriaLabel }
115
101
/>
102
+ ) }
103
+ < div className = "pf-c-wizard__outer-wrap" >
104
+ < div className = "pf-c-wizard__inner-wrap" >
105
+ < WizardNav aria-label = { navAriaLabel } >
106
+ < FormSpy subscription = { { values : true , valid : true , validating : true } } >
107
+ { ( { values, valid, validating } ) => (
108
+ < WizardNavigation
109
+ navSchema = { navSchema }
110
+ activeStepIndex = { activeStepIndex }
111
+ valid = { valid }
112
+ maxStepIndex = { maxStepIndex }
113
+ jumpToStep = { jumpToStep }
114
+ crossroads = { crossroads }
115
+ isDynamic = { isDynamic }
116
+ values = { values }
117
+ setPrevSteps = { setPrevSteps }
118
+ validating = { validating }
119
+ />
120
+ ) }
121
+ </ FormSpy >
122
+ </ WizardNav >
123
+ < WizardStep
124
+ { ...currentStep }
125
+ formOptions = { formOptions }
126
+ buttonLabels = { buttonLabels }
127
+ buttonsClassName = { buttonsClassName }
128
+ showTitles = { showTitles }
129
+ handleNext = { ( nextStep ) => handleNext ( nextStep ) }
130
+ handlePrev = { handlePrev }
131
+ disableBack = { activeStepIndex === 0 }
132
+ hasNoBodyPadding = { hasNoBodyPadding }
133
+ />
134
+ </ div >
116
135
</ div >
117
136
</ div >
118
137
</ Modal >
@@ -136,6 +155,12 @@ WizardInternal.propTypes = {
136
155
isDynamic : PropTypes . bool ,
137
156
showTitles : PropTypes . bool ,
138
157
crossroads : PropTypes . arrayOf ( PropTypes . string ) ,
158
+ hideClose : PropTypes . bool ,
159
+ titleId : PropTypes . string ,
160
+ descriptionId : PropTypes . string ,
161
+ closeButtonAriaLabel : PropTypes . string ,
162
+ hasNoBodyPadding : PropTypes . bool ,
163
+ navAriaLabel : PropTypes . string ,
139
164
...wizardProps
140
165
} ;
141
166
0 commit comments