11import * as React from 'react' ;
22import { useState } from 'react' ;
3- import { ThemeProvider , createTheme , ITheme , IFocusZoneProps } from '@fluentui/react' ;
3+ import { ThemeProvider , createTheme , ITheme , IFocusZoneProps , mergeStyles } from '@fluentui/react' ;
44import { ISubwayNavNodeProps , SubwayNavNodeState } from '../utilities/subway-nav/subway-node.types' ;
55import { goToStepById , completeAllSteps , errorAllSteps } from '../utilities/utilities' ;
66import { SubwayNav as CustomSubwayNav } from '../utilities/subway-nav/subway-nav' ;
@@ -10,6 +10,7 @@ import { M365Styles, IM365ExtendedSemanticColors } from '../utilities/customizat
1010import { useAsync , usePrevious } from '@fluentui/react-hooks' ;
1111import { getSubwayNavNodeState } from './DatasetMapping' ;
1212import { PPACActualLightTheme , PPACActualDarkTheme } from '../utilities/themes' ;
13+ import { subwayNavWidth , wizardContentMaxWidth } from '../utilities/wizard' ;
1314
1415// reference : https://admincontrolsdemoapps.blob.core.windows.net/demo-app/latest/DemoApp/index.html#/examples/subwaynav
1516
@@ -50,10 +51,10 @@ export const CanvasSubwayNav = React.memo((props: ISubNavProps): React.ReactElem
5051 }
5152 return themeJSON
5253 ? createTheme ( {
53- palette : { ...JSON . parse ( themeJSON ) . palette } ,
54- semanticColors : semanticColorsCopy ,
55- components : M365Styles ,
56- } )
54+ palette : { ...JSON . parse ( themeJSON ) . palette } ,
55+ semanticColors : semanticColorsCopy ,
56+ components : M365Styles ,
57+ } )
5758 : copyofM365Theme ;
5859 } catch ( ex ) {
5960 /* istanbul ignore next */
@@ -155,6 +156,8 @@ export const CanvasSubwayNav = React.memo((props: ISubNavProps): React.ReactElem
155156 focusZoneProps = { focusZoneProps }
156157 stateAriaLabels = { ariaLabelStrings }
157158 steps = { steps }
159+ //This is required to override width styles in custom pages
160+ styles = { { root : { width : props . width } } }
158161 { ...( wizardComplete !== 'None' && { wizardComplete : isNavCompleteOrError } ) }
159162 />
160163 </ ThemeProvider >
0 commit comments