Skip to content
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

[docs–infra] Fix callout container width #38880

Merged
merged 2 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ export default function Page() {
<Sheet>
{/* Next.js won't render this button without 'use-client' */}
<Button
variant="outlined"
onClick={() => {
console.log('handle click');
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ export default function Page() {
<Container>
{/* Next.js won't render this button without 'use-client' */}
<Button
variant="text"
onClick={() => {
console.log('handle click');
}}
Expand Down
16 changes: 16 additions & 0 deletions docs/pages/experiments/docs/callouts.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,19 @@ It says, "You will fail if you don't heed this dire warning."
- a [link](#link).
:::
```

## With code

:::info
This is a callout.

```jsx
import * as React from 'react';
import Stack from '@mui/material/Stack';

export default function BasicAlerts() {
return <Stack sx={{ width: '100%' }} spacing={2} />;
}
```

:::
1 change: 1 addition & 0 deletions docs/src/modules/components/MarkdownElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ const Root = styled('div')(
}px)`,
'& .MuiCallout-content': {
minWidth: 0, // Allows content to shrink. Useful when callout contains code block
flexGrow: 1,
display: 'flex',
flexDirection: 'column',
gap: 6,
Expand Down