mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +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
|
@ -41,7 +41,9 @@ function AdmonitionHeading({icon, title}: Pick<Props, 'icon' | 'title'>) {
|
|||
}
|
||||
|
||||
function AdmonitionContent({children}: Pick<Props, 'children'>) {
|
||||
return <div className={styles.admonitionContent}>{children}</div>;
|
||||
return children ? (
|
||||
<div className={styles.admonitionContent}>{children}</div>
|
||||
) : null;
|
||||
}
|
||||
|
||||
export default function AdmonitionLayout(props: Props): JSX.Element {
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
font: var(--ifm-heading-font-weight) var(--ifm-h5-font-size) /
|
||||
var(--ifm-heading-line-height) var(--ifm-heading-font-family);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/* Heading alone without content (does not handle fragment content) */
|
||||
.admonitionHeading:not(:last-child) {
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue