mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 08:19:07 +02:00
fix(theme-classic): polish admonition details, render title-only admonitions (#8150)
Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
32dc1eddba
commit
f3563ca23c
5 changed files with 71 additions and 4 deletions
61
website/_dogfooding/_docs tests/tests/admonitions.mdx
Normal file
61
website/_dogfooding/_docs tests/tests/admonitions.mdx
Normal file
|
@ -0,0 +1,61 @@
|
|||
# Admonitions tests
|
||||
|
||||
## Empty content
|
||||
|
||||
:::note Title Only
|
||||
|
||||
:::
|
||||
|
||||
## Empty fragment content
|
||||
|
||||
:::note Title Only
|
||||
|
||||
<></>
|
||||
|
||||
:::
|
||||
|
||||
## Large font icon
|
||||
|
||||
```mdx-code-block
|
||||
<admonition
|
||||
type="tip"
|
||||
icon={<span style={{fontSize: 60}}>💡</span>}
|
||||
title="Did you know...">
|
||||
<p>
|
||||
content
|
||||
</p>
|
||||
</admonition>
|
||||
|
||||
<admonition
|
||||
type="info"
|
||||
icon={<span style={{fontSize: 40}}>ℹ️</span>}
|
||||
title="Did you know...">
|
||||
<p>
|
||||
content
|
||||
</p>
|
||||
</admonition>
|
||||
```
|
||||
|
||||
## Large svg icon
|
||||
|
||||
```mdx-code-block
|
||||
import InfoIcon from "@theme/Admonition/Icon/Info"
|
||||
|
||||
<admonition
|
||||
type="tip"
|
||||
icon={<InfoIcon style={{width: 60, height: 60}}/>}
|
||||
title="Did you know...">
|
||||
<p>
|
||||
content
|
||||
</p>
|
||||
</admonition>
|
||||
|
||||
<admonition
|
||||
type="info"
|
||||
icon={<InfoIcon style={{width: 40, height: 40}}/>}
|
||||
title="Did you know...">
|
||||
<p>
|
||||
content
|
||||
</p>
|
||||
</admonition>
|
||||
```
|
|
@ -82,6 +82,6 @@
|
|||
padding: 1rem;
|
||||
}
|
||||
|
||||
.browserWindowBody *:last-child {
|
||||
.browserWindowBody > *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue