@@ -43,6 +43,7 @@ import { TableOfContents } from '../TableOfContents'
4343import { Heading } from '../Heading'
4444
4545import { AppContext } from '../appContext'
46+ import { navigateTo } from '../navigationUtils'
4647
4748import { allowedProps } from './props'
4849import type { DocumentProps , DocumentState , DocDataType } from './props'
@@ -203,7 +204,15 @@ class Document extends Component<DocumentProps, DocumentState> {
203204 < View margin = "small 0" display = "block" >
204205 The easiest way to do this is to utilize the{ ' ' }
205206 < code > themeOverride</ code > property. See the{ ' ' }
206- < Link href = "#legacy-theme-overrides" > Legacy theme overrides</ Link > { ' ' }
207+ < Link
208+ href = "legacy-theme-overrides"
209+ onClick = { ( e ) => {
210+ e . preventDefault ( )
211+ navigateTo ( 'legacy-theme-overrides' )
212+ } }
213+ >
214+ Legacy theme overrides
215+ </ Link > { ' ' }
207216 guide for more info and alternative methods.
208217 </ View >
209218
@@ -307,7 +316,16 @@ import { ${importName} } from '${versionedPackageName}'`
307316 < View as = "div" margin = "small 0 0 0" >
308317 This import is pinned to the selected component version; future
309318 breaking changes land at new paths. For other import styles, see the{ ' ' }
310- < Link href = "component-versioning" > Component versioning</ Link > guide.
319+ < Link
320+ href = "component-versioning"
321+ onClick = { ( e ) => {
322+ e . preventDefault ( )
323+ navigateTo ( 'component-versioning' )
324+ } }
325+ >
326+ Component versioning
327+ </ Link > { ' ' }
328+ guide.
311329 </ View >
312330 </ View >
313331 )
0 commit comments