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 authored 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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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.