@docusaurus/theme-classic 0.0.0-5408 → 0.0.0-5410

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,9 @@ function AdmonitionHeading({icon, title}) {
30
30
  );
31
31
  }
32
32
  function AdmonitionContent({children}) {
33
- return <div className={styles.admonitionContent}>{children}</div>;
33
+ return children ? (
34
+ <div className={styles.admonitionContent}>{children}</div>
35
+ ) : null;
34
36
  }
35
37
  export default function AdmonitionLayout(props) {
36
38
  const {type, icon, title, children, className} = props;
@@ -13,6 +13,10 @@
13
13
  font: var(--ifm-heading-font-weight) var(--ifm-h5-font-size) /
14
14
  var(--ifm-heading-line-height) var(--ifm-heading-font-family);
15
15
  text-transform: uppercase;
16
+ }
17
+
18
+ /* Heading alone without content (does not handle fragment content) */
19
+ .admonitionHeading:not(:last-child) {
16
20
  margin-bottom: 0.3rem;
17
21
  }
18
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "0.0.0-5408",
3
+ "version": "0.0.0-5410",
4
4
  "description": "Classic theme for Docusaurus",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-classic.d.ts",
@@ -20,18 +20,18 @@
20
20
  "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
21
21
  },
22
22
  "dependencies": {
23
- "@docusaurus/core": "0.0.0-5408",
24
- "@docusaurus/mdx-loader": "0.0.0-5408",
25
- "@docusaurus/module-type-aliases": "0.0.0-5408",
26
- "@docusaurus/plugin-content-blog": "0.0.0-5408",
27
- "@docusaurus/plugin-content-docs": "0.0.0-5408",
28
- "@docusaurus/plugin-content-pages": "0.0.0-5408",
29
- "@docusaurus/theme-common": "0.0.0-5408",
30
- "@docusaurus/theme-translations": "0.0.0-5408",
31
- "@docusaurus/types": "0.0.0-5408",
32
- "@docusaurus/utils": "0.0.0-5408",
33
- "@docusaurus/utils-common": "0.0.0-5408",
34
- "@docusaurus/utils-validation": "0.0.0-5408",
23
+ "@docusaurus/core": "0.0.0-5410",
24
+ "@docusaurus/mdx-loader": "0.0.0-5410",
25
+ "@docusaurus/module-type-aliases": "0.0.0-5410",
26
+ "@docusaurus/plugin-content-blog": "0.0.0-5410",
27
+ "@docusaurus/plugin-content-docs": "0.0.0-5410",
28
+ "@docusaurus/plugin-content-pages": "0.0.0-5410",
29
+ "@docusaurus/theme-common": "0.0.0-5410",
30
+ "@docusaurus/theme-translations": "0.0.0-5410",
31
+ "@docusaurus/types": "0.0.0-5410",
32
+ "@docusaurus/utils": "0.0.0-5410",
33
+ "@docusaurus/utils-common": "0.0.0-5410",
34
+ "@docusaurus/utils-validation": "0.0.0-5410",
35
35
  "@mdx-js/react": "^1.6.22",
36
36
  "clsx": "^1.2.1",
37
37
  "copy-text-to-clipboard": "^3.0.1",
@@ -62,5 +62,5 @@
62
62
  "engines": {
63
63
  "node": ">=16.14"
64
64
  },
65
- "gitHead": "6d1f31ee146538494968633a12e92c47cd3de973"
65
+ "gitHead": "1675018febfafecbd59e3124d1818cf0845424e9"
66
66
  }
@@ -41,7 +41,9 @@ function AdmonitionHeading({icon, title}: Pick<Props, 'icon' | 'title'>) {
41
41
  }
42
42
 
43
43
  function AdmonitionContent({children}: Pick<Props, 'children'>) {
44
- return <div className={styles.admonitionContent}>{children}</div>;
44
+ return children ? (
45
+ <div className={styles.admonitionContent}>{children}</div>
46
+ ) : null;
45
47
  }
46
48
 
47
49
  export default function AdmonitionLayout(props: Props): JSX.Element {
@@ -13,6 +13,10 @@
13
13
  font: var(--ifm-heading-font-weight) var(--ifm-h5-font-size) /
14
14
  var(--ifm-heading-line-height) var(--ifm-heading-font-family);
15
15
  text-transform: uppercase;
16
+ }
17
+
18
+ /* Heading alone without content (does not handle fragment content) */
19
+ .admonitionHeading:not(:last-child) {
16
20
  margin-bottom: 0.3rem;
17
21
  }
18
22