@@ -21,6 +21,7 @@ type WizardStepControlsProps = {
2121 presentation ?: "channels" ;
2222 answerLabel ?: string ;
2323 confirmAffirmativeLabel ?: string ;
24+ leadingAction ?: TemplateResult ;
2425 sensitiveRevealed ?: boolean ;
2526 onToggleSensitiveVisibility ?: ( ) => void ;
2627} ;
@@ -98,8 +99,13 @@ function renderAnswerButton(
9899 ${ props . answerLabel ?? label }
99100 </ button >
100101 ` ;
101- return props . presentation === "channels"
102- ? html `< div class ="channels-wizard__footer "> ${ button } </ div > `
102+ if ( props . presentation === "channels" ) {
103+ return html `< div class ="channels-wizard__footer "> ${ button } </ div > ` ;
104+ }
105+ return props . leadingAction
106+ ? html `< div class ="wizard-step__actions wizard-step__actions--split ">
107+ ${ props . leadingAction } ${ button }
108+ </ div > `
103109 : button ;
104110}
105111
@@ -170,6 +176,11 @@ function renderProgressStep(props: WizardStepControlsProps) {
170176 < span class ="wizard-step__spinner " aria-hidden ="true "> </ span >
171177 ${ renderMessage ( props ) }
172178 </ div >
179+ ${ props . leadingAction
180+ ? html `< div class ="wizard-step__actions wizard-step__actions--split ">
181+ ${ props . leadingAction }
182+ </ div > `
183+ : nothing }
173184 ` ;
174185}
175186
@@ -271,9 +282,15 @@ function renderOptionsStep(props: WizardStepControlsProps) {
271282}
272283
273284function renderConfirmStep ( props : WizardStepControlsProps ) {
285+ const actionClass = stepClass ( props , props . presentation === "channels" ? "footer" : "actions" ) ;
274286 return html `
275287 ${ renderMessage ( props ) }
276- < div class =${ stepClass ( props , props . presentation === "channels" ? "footer" : "actions" ) } >
288+ < div
289+ class =${ props . presentation !== "channels" && props . leadingAction
290+ ? `${ actionClass } wizard-step__actions--split`
291+ : actionClass }
292+ >
293+ ${ props . presentation === "channels" ? nothing : ( props . leadingAction ?? nothing ) }
277294 ${ [ false , true ] . map (
278295 ( answer ) => html `< button
279296 type ="button "
@@ -290,8 +307,9 @@ function renderConfirmStep(props: WizardStepControlsProps) {
290307
291308/**
292309 * Renders the interactive controls for one `WizardStep`. Container-agnostic on
293- * purpose: no dialog chrome, no cancel row, no page state — callers place the
294- * result wherever the step is being asked (modal, panel, or chat bubble).
310+ * purpose: no dialog chrome or page state — callers place the result wherever
311+ * the step is being asked (modal, panel, or chat bubble). A caller may supply a
312+ * leading action so escape and answer controls share one footer row.
295313 */
296314export function renderWizardStepControls (
297315 props : WizardStepControlsProps ,
0 commit comments