File tree 2 files changed +19
-0
lines changed
docs/src/modules/components
packages/mui-docs/src/translations
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import Tooltip from '@mui/material/Tooltip';
19
19
import Divider from '@mui/material/Divider' ;
20
20
import RefreshRoundedIcon from '@mui/icons-material/RefreshRounded' ;
21
21
import ResetFocusIcon from '@mui/icons-material/CenterFocusWeak' ;
22
+ import OpenInNewIcon from '@mui/icons-material/OpenInNew' ;
22
23
import { useRouter } from 'next/router' ;
23
24
import { CODE_VARIANTS , CODE_STYLING } from 'docs/src/modules/constants' ;
24
25
import { useSetCodeVariant } from 'docs/src/modules/utils/codeVariant' ;
@@ -563,6 +564,23 @@ export default function DemoToolbar(props) {
563
564
</ DemoTooltip >
564
565
</ React . Fragment >
565
566
) }
567
+ < DemoTooltip title = { t ( 'openInNewTab' ) } placement = "bottom" >
568
+ < IconButton
569
+ data-ga-event-category = "demo"
570
+ data-ga-event-label = { demo . gaLabel }
571
+ data-ga-event-action = "openInNewTab"
572
+ onClick = { ( ) => {
573
+ const url = new URL ( window . location . href ) ;
574
+ url . hash = '' ;
575
+ url . searchParams . set ( 'scopedDemo' , demoOptions . demo ) ;
576
+ window . open ( url . toString ( ) , '_blank' ) ;
577
+ } }
578
+ { ...getControlProps ( 5 ) }
579
+ sx = { { borderRadius : 1 } }
580
+ >
581
+ < OpenInNewIcon />
582
+ </ IconButton >
583
+ </ DemoTooltip >
566
584
< DemoTooltip title = { t ( 'copySource' ) } placement = "bottom" >
567
585
< IconButton
568
586
data-ga-event-category = "demo"
Original file line number Diff line number Diff line change 150
150
"mainNavigation" : " documentation" ,
151
151
"newest" : " Newest" ,
152
152
"openDrawer" : " Open documentation navigation" ,
153
+ "openInNewTab" : " Open in new tab" ,
153
154
"or" : " or" ,
154
155
"pageTOC" : " Page table of contents" ,
155
156
"praise" : " Praise for MUI" ,
You can’t perform that action at this time.
0 commit comments