Skip to content

Commit

Permalink
[docs-infra] Simplify docs demo (#42016)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Apr 24, 2024
1 parent afffc2f commit ca6b5b4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 0 additions & 2 deletions docs/pages/experiments/docs/DemoInDocs.js
Expand Up @@ -5,8 +5,6 @@ import Stack from '@mui/material/Stack';
export default function DemoInDocs() {
return (
<Stack sx={{ width: '100%' }} spacing={2}>
<Alert severity="error">This is an error alert — check it out!</Alert>
<Alert severity="warning">This is a warning alert — check it out!</Alert>
<Alert severity="info">This is an info alert — check it out!</Alert>
<Alert severity="success">This is a success alert — check it out!</Alert>
</Stack>
Expand Down
2 changes: 0 additions & 2 deletions docs/pages/experiments/docs/DemoInDocs.tsx.preview
@@ -1,4 +1,2 @@
<Alert severity="error">This is an error alert — check it out!</Alert>
<Alert severity="warning">This is a warning alert — check it out!</Alert>
<Alert severity="info">This is an info alert — check it out!</Alert>
<Alert severity="success">This is a success alert — check it out!</Alert>
12 changes: 12 additions & 0 deletions docs/pages/experiments/docs/DemoInDocsNotEditable.js
@@ -0,0 +1,12 @@
import * as React from 'react';
import Alert from '@mui/material/Alert';
import Stack from '@mui/material/Stack';

export default function DemoInDocs() {
return (
<Stack sx={{ width: '100%' }} spacing={2}>
<Alert severity="info">This is an info alert — check it out!</Alert>
<Alert severity="success">This is a success alert — check it out!</Alert>
</Stack>
);
}
2 changes: 2 additions & 0 deletions docs/pages/experiments/docs/DemoInDocsNotEditable.tsx.preview
@@ -0,0 +1,2 @@
<Alert severity="info">This is an info alert — check it out!</Alert>
<Alert severity="success">This is a success alert — check it out!</Alert>
6 changes: 3 additions & 3 deletions docs/pages/experiments/docs/demos.md
Expand Up @@ -27,15 +27,15 @@ So, it renders the "outlined" background variant.

## "hideToolbar": true

{{"demo": "DemoInDocs.js", "hideToolbar": true}}
{{"demo": "DemoInDocsNotEditable.js", "hideToolbar": true}}

## "hideToolbar": true, "bg": true

{{"demo": "DemoInDocs.js", "hideToolbar": true, "bg": true}}
{{"demo": "DemoInDocsNotEditable.js", "hideToolbar": true, "bg": true}}

## "hideToolbar": true, "bg": "inline"

{{"demo": "DemoInDocs.js", "hideToolbar": true, "bg": "inline"}}
{{"demo": "DemoInDocsNotEditable.js", "hideToolbar": true, "bg": "inline"}}

## Multiple Tabs demo

Expand Down

0 comments on commit ca6b5b4

Please sign in to comment.