-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
[docs] Full screen demos in new tab #46088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Netlify deploy previewhttps://deploy-preview-46088--material-ui.netlify.app/ Bundle size report |
@@ -127,6 +127,7 @@ export default withDocsInfra({ | |||
{ | |||
loader: require.resolve('@mui/internal-markdown/loader'), | |||
options: { | |||
enableOpenInNewTab: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it opt-in; the "Open in new tab" button in the demo toolbar is not shown by default.
But the ?scopedDemo
URL is supported regardless of this setting.
I don't know if the Core wants to have this enabled for the whole repo.
You can disable enableOpenInNewTab
and enable it for specific pages like this:
import * as pageProps from 'docs/data/material/components/drawers/drawers.md?muiMarkdown';
export default function Page() {
return <MarkdownDocs {...pageProps} enableOpenInNewTab />;
}
This could be particularly useful for pages like https://mui.com/material-ui/react-drawer/
Let me know if you have a preference for this setting, and I'll update the PR accordingly.
Based on #45785
I opened a separate PR, because I was suddenly unable to push to Jan's branch anymore 🤷♂️
https://deploy-preview-46088--material-ui.netlify.app/material-ui/react-button/?scopedDemo=BasicButtons.js
https://deploy-preview-46088--material-ui.netlify.app/material-ui/react-table/?scopedDemo=DataTable.js