@docusaurus/theme-classic 0.0.0-5256 → 0.0.0-5260
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.
- package/lib/theme/AnnouncementBar/CloseButton/index.d.ts +9 -0
- package/lib/theme/AnnouncementBar/CloseButton/index.js +26 -0
- package/lib/theme/AnnouncementBar/CloseButton/styles.module.css +11 -0
- package/lib/theme/AnnouncementBar/Content/index.d.ts +9 -0
- package/lib/theme/AnnouncementBar/Content/index.js +23 -0
- package/lib/theme/AnnouncementBar/Content/styles.module.css +17 -0
- package/lib/theme/AnnouncementBar/index.js +10 -23
- package/lib/theme/AnnouncementBar/styles.module.css +2 -11
- package/lib/theme/DocSidebarItem/Link/index.js +2 -1
- package/package.json +14 -14
- package/src/theme/AnnouncementBar/CloseButton/index.tsx +31 -0
- package/src/theme/AnnouncementBar/CloseButton/styles.module.css +11 -0
- package/src/theme/AnnouncementBar/Content/index.tsx +28 -0
- package/src/theme/AnnouncementBar/Content/styles.module.css +17 -0
- package/src/theme/AnnouncementBar/index.tsx +10 -26
- package/src/theme/AnnouncementBar/styles.module.css +2 -11
- package/src/theme/DocSidebarItem/Link/index.tsx +2 -1
- package/src/theme-classic.d.ts +16 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import type { Props } from '@theme/AnnouncementBar/CloseButton';
|
|
9
|
+
export default function AnnouncementBarCloseButton(props: Props): JSX.Element | null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import {translate} from '@docusaurus/Translate';
|
|
10
|
+
import IconClose from '@theme/Icon/Close';
|
|
11
|
+
import styles from './styles.module.css';
|
|
12
|
+
export default function AnnouncementBarCloseButton(props) {
|
|
13
|
+
return (
|
|
14
|
+
<button
|
|
15
|
+
type="button"
|
|
16
|
+
aria-label={translate({
|
|
17
|
+
id: 'theme.AnnouncementBar.closeButtonAriaLabel',
|
|
18
|
+
message: 'Close',
|
|
19
|
+
description: 'The ARIA label for close button of announcement bar',
|
|
20
|
+
})}
|
|
21
|
+
{...props}
|
|
22
|
+
className={clsx('clean-btn close', styles.closeButton, props.className)}>
|
|
23
|
+
<IconClose width={14} height={14} strokeWidth={3.1} />
|
|
24
|
+
</button>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
/// <reference types="react" />
|
|
8
|
+
import type { Props } from '@theme/AnnouncementBar/Content';
|
|
9
|
+
export default function AnnouncementBarContent(props: Props): JSX.Element | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
10
|
+
import styles from './styles.module.css';
|
|
11
|
+
export default function AnnouncementBarContent(props) {
|
|
12
|
+
const {announcementBar} = useThemeConfig();
|
|
13
|
+
const {content} = announcementBar;
|
|
14
|
+
return (
|
|
15
|
+
<div
|
|
16
|
+
{...props}
|
|
17
|
+
className={clsx(styles.content, props.className)}
|
|
18
|
+
// Developer provided the HTML, so assume it's safe.
|
|
19
|
+
// eslint-disable-next-line react/no-danger
|
|
20
|
+
dangerouslySetInnerHTML={{__html: content}}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.content {
|
|
9
|
+
font-size: 85%;
|
|
10
|
+
text-align: center;
|
|
11
|
+
padding: 5px 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.content a {
|
|
15
|
+
color: inherit;
|
|
16
|
+
text-decoration: underline;
|
|
17
|
+
}
|
|
@@ -5,44 +5,31 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import clsx from 'clsx';
|
|
9
8
|
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
10
9
|
import {useAnnouncementBar} from '@docusaurus/theme-common/internal';
|
|
11
|
-
import
|
|
12
|
-
import
|
|
10
|
+
import AnnouncementBarCloseButton from '@theme/AnnouncementBar/CloseButton';
|
|
11
|
+
import AnnouncementBarContent from '@theme/AnnouncementBar/Content';
|
|
13
12
|
import styles from './styles.module.css';
|
|
14
13
|
export default function AnnouncementBar() {
|
|
15
|
-
const {isActive, close} = useAnnouncementBar();
|
|
16
14
|
const {announcementBar} = useThemeConfig();
|
|
15
|
+
const {isActive, close} = useAnnouncementBar();
|
|
17
16
|
if (!isActive) {
|
|
18
17
|
return null;
|
|
19
18
|
}
|
|
20
|
-
const {
|
|
19
|
+
const {backgroundColor, textColor, isCloseable} = announcementBar;
|
|
21
20
|
return (
|
|
22
21
|
<div
|
|
23
22
|
className={styles.announcementBar}
|
|
24
23
|
style={{backgroundColor, color: textColor}}
|
|
25
24
|
role="banner">
|
|
26
25
|
{isCloseable && <div className={styles.announcementBarPlaceholder} />}
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// eslint-disable-next-line react/no-danger
|
|
31
|
-
dangerouslySetInnerHTML={{__html: content}}
|
|
32
|
-
/>
|
|
33
|
-
{isCloseable ? (
|
|
34
|
-
<button
|
|
35
|
-
type="button"
|
|
36
|
-
className={clsx('clean-btn close', styles.announcementBarClose)}
|
|
26
|
+
<AnnouncementBarContent className={styles.announcementBarContent} />
|
|
27
|
+
{isCloseable && (
|
|
28
|
+
<AnnouncementBarCloseButton
|
|
37
29
|
onClick={close}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
description: 'The ARIA label for close button of announcement bar',
|
|
42
|
-
})}>
|
|
43
|
-
<IconClose width={14} height={14} strokeWidth={3.1} />
|
|
44
|
-
</button>
|
|
45
|
-
) : null}
|
|
30
|
+
className={styles.announcementBarClose}
|
|
31
|
+
/>
|
|
32
|
+
)}
|
|
46
33
|
</div>
|
|
47
34
|
);
|
|
48
35
|
}
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
height: var(--docusaurus-announcement-bar-height);
|
|
16
16
|
background-color: var(--ifm-color-white);
|
|
17
17
|
color: var(--ifm-color-black);
|
|
18
|
-
|
|
18
|
+
box-shadow: var(--ifm-global-shadow-lw);
|
|
19
|
+
z-index: calc(var(--ifm-z-index-fixed) + 1); /* just above the navbar */
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
html[data-announcement-bar-initially-dismissed='true'] .announcementBar {
|
|
@@ -29,15 +30,10 @@ html[data-announcement-bar-initially-dismissed='true'] .announcementBar {
|
|
|
29
30
|
.announcementBarClose {
|
|
30
31
|
flex: 0 0 30px;
|
|
31
32
|
align-self: stretch;
|
|
32
|
-
padding: 0;
|
|
33
|
-
line-height: 0;
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
.announcementBarContent {
|
|
37
36
|
flex: 1 1 auto;
|
|
38
|
-
font-size: 85%;
|
|
39
|
-
text-align: center;
|
|
40
|
-
padding: 5px 0;
|
|
41
37
|
}
|
|
42
38
|
|
|
43
39
|
@media print {
|
|
@@ -46,11 +42,6 @@ html[data-announcement-bar-initially-dismissed='true'] .announcementBar {
|
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
44
|
|
|
49
|
-
.announcementBarContent a {
|
|
50
|
-
color: inherit;
|
|
51
|
-
text-decoration: underline;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
45
|
@media (min-width: 997px) {
|
|
55
46
|
:root {
|
|
56
47
|
--docusaurus-announcement-bar-height: 30px;
|
|
@@ -20,7 +20,7 @@ export default function DocSidebarItemLink({
|
|
|
20
20
|
index,
|
|
21
21
|
...props
|
|
22
22
|
}) {
|
|
23
|
-
const {href, label, className} = item;
|
|
23
|
+
const {href, label, className, autoAddBaseUrl} = item;
|
|
24
24
|
const isActive = isActiveSidebarItem(item, activePath);
|
|
25
25
|
const isInternalLink = isInternalUrl(href);
|
|
26
26
|
return (
|
|
@@ -40,6 +40,7 @@ export default function DocSidebarItemLink({
|
|
|
40
40
|
'menu__link--active': isActive,
|
|
41
41
|
},
|
|
42
42
|
)}
|
|
43
|
+
autoAddBaseUrl={autoAddBaseUrl}
|
|
43
44
|
aria-current={isActive ? 'page' : undefined}
|
|
44
45
|
to={href}
|
|
45
46
|
{...(isInternalLink && {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5260",
|
|
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-
|
|
24
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
25
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
26
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
28
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
29
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
30
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
31
|
-
"@docusaurus/types": "0.0.0-
|
|
32
|
-
"@docusaurus/utils": "0.0.0-
|
|
33
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
34
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
23
|
+
"@docusaurus/core": "0.0.0-5260",
|
|
24
|
+
"@docusaurus/mdx-loader": "0.0.0-5260",
|
|
25
|
+
"@docusaurus/module-type-aliases": "0.0.0-5260",
|
|
26
|
+
"@docusaurus/plugin-content-blog": "0.0.0-5260",
|
|
27
|
+
"@docusaurus/plugin-content-docs": "0.0.0-5260",
|
|
28
|
+
"@docusaurus/plugin-content-pages": "0.0.0-5260",
|
|
29
|
+
"@docusaurus/theme-common": "0.0.0-5260",
|
|
30
|
+
"@docusaurus/theme-translations": "0.0.0-5260",
|
|
31
|
+
"@docusaurus/types": "0.0.0-5260",
|
|
32
|
+
"@docusaurus/utils": "0.0.0-5260",
|
|
33
|
+
"@docusaurus/utils-common": "0.0.0-5260",
|
|
34
|
+
"@docusaurus/utils-validation": "0.0.0-5260",
|
|
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": "
|
|
65
|
+
"gitHead": "db60780cbcaaf6c55b3715f7dd6e5ede8cda989b"
|
|
66
66
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
10
|
+
import {translate} from '@docusaurus/Translate';
|
|
11
|
+
import IconClose from '@theme/Icon/Close';
|
|
12
|
+
import type {Props} from '@theme/AnnouncementBar/CloseButton';
|
|
13
|
+
import styles from './styles.module.css';
|
|
14
|
+
|
|
15
|
+
export default function AnnouncementBarCloseButton(
|
|
16
|
+
props: Props,
|
|
17
|
+
): JSX.Element | null {
|
|
18
|
+
return (
|
|
19
|
+
<button
|
|
20
|
+
type="button"
|
|
21
|
+
aria-label={translate({
|
|
22
|
+
id: 'theme.AnnouncementBar.closeButtonAriaLabel',
|
|
23
|
+
message: 'Close',
|
|
24
|
+
description: 'The ARIA label for close button of announcement bar',
|
|
25
|
+
})}
|
|
26
|
+
{...props}
|
|
27
|
+
className={clsx('clean-btn close', styles.closeButton, props.className)}>
|
|
28
|
+
<IconClose width={14} height={14} strokeWidth={3.1} />
|
|
29
|
+
</button>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
10
|
+
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
11
|
+
import type {Props} from '@theme/AnnouncementBar/Content';
|
|
12
|
+
import styles from './styles.module.css';
|
|
13
|
+
|
|
14
|
+
export default function AnnouncementBarContent(
|
|
15
|
+
props: Props,
|
|
16
|
+
): JSX.Element | null {
|
|
17
|
+
const {announcementBar} = useThemeConfig();
|
|
18
|
+
const {content} = announcementBar!;
|
|
19
|
+
return (
|
|
20
|
+
<div
|
|
21
|
+
{...props}
|
|
22
|
+
className={clsx(styles.content, props.className)}
|
|
23
|
+
// Developer provided the HTML, so assume it's safe.
|
|
24
|
+
// eslint-disable-next-line react/no-danger
|
|
25
|
+
dangerouslySetInnerHTML={{__html: content}}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.content {
|
|
9
|
+
font-size: 85%;
|
|
10
|
+
text-align: center;
|
|
11
|
+
padding: 5px 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.content a {
|
|
15
|
+
color: inherit;
|
|
16
|
+
text-decoration: underline;
|
|
17
|
+
}
|
|
@@ -6,49 +6,33 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import clsx from 'clsx';
|
|
10
9
|
import {useThemeConfig} from '@docusaurus/theme-common';
|
|
11
10
|
import {useAnnouncementBar} from '@docusaurus/theme-common/internal';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
11
|
+
import AnnouncementBarCloseButton from '@theme/AnnouncementBar/CloseButton';
|
|
12
|
+
import AnnouncementBarContent from '@theme/AnnouncementBar/Content';
|
|
14
13
|
|
|
15
14
|
import styles from './styles.module.css';
|
|
16
15
|
|
|
17
16
|
export default function AnnouncementBar(): JSX.Element | null {
|
|
18
|
-
const {isActive, close} = useAnnouncementBar();
|
|
19
17
|
const {announcementBar} = useThemeConfig();
|
|
20
|
-
|
|
18
|
+
const {isActive, close} = useAnnouncementBar();
|
|
21
19
|
if (!isActive) {
|
|
22
20
|
return null;
|
|
23
21
|
}
|
|
24
|
-
|
|
25
|
-
const {content, backgroundColor, textColor, isCloseable} = announcementBar!;
|
|
26
|
-
|
|
22
|
+
const {backgroundColor, textColor, isCloseable} = announcementBar!;
|
|
27
23
|
return (
|
|
28
24
|
<div
|
|
29
25
|
className={styles.announcementBar}
|
|
30
26
|
style={{backgroundColor, color: textColor}}
|
|
31
27
|
role="banner">
|
|
32
28
|
{isCloseable && <div className={styles.announcementBarPlaceholder} />}
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// eslint-disable-next-line react/no-danger
|
|
37
|
-
dangerouslySetInnerHTML={{__html: content}}
|
|
38
|
-
/>
|
|
39
|
-
{isCloseable ? (
|
|
40
|
-
<button
|
|
41
|
-
type="button"
|
|
42
|
-
className={clsx('clean-btn close', styles.announcementBarClose)}
|
|
29
|
+
<AnnouncementBarContent className={styles.announcementBarContent} />
|
|
30
|
+
{isCloseable && (
|
|
31
|
+
<AnnouncementBarCloseButton
|
|
43
32
|
onClick={close}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
description: 'The ARIA label for close button of announcement bar',
|
|
48
|
-
})}>
|
|
49
|
-
<IconClose width={14} height={14} strokeWidth={3.1} />
|
|
50
|
-
</button>
|
|
51
|
-
) : null}
|
|
33
|
+
className={styles.announcementBarClose}
|
|
34
|
+
/>
|
|
35
|
+
)}
|
|
52
36
|
</div>
|
|
53
37
|
);
|
|
54
38
|
}
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
height: var(--docusaurus-announcement-bar-height);
|
|
16
16
|
background-color: var(--ifm-color-white);
|
|
17
17
|
color: var(--ifm-color-black);
|
|
18
|
-
|
|
18
|
+
box-shadow: var(--ifm-global-shadow-lw);
|
|
19
|
+
z-index: calc(var(--ifm-z-index-fixed) + 1); /* just above the navbar */
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
html[data-announcement-bar-initially-dismissed='true'] .announcementBar {
|
|
@@ -29,15 +30,10 @@ html[data-announcement-bar-initially-dismissed='true'] .announcementBar {
|
|
|
29
30
|
.announcementBarClose {
|
|
30
31
|
flex: 0 0 30px;
|
|
31
32
|
align-self: stretch;
|
|
32
|
-
padding: 0;
|
|
33
|
-
line-height: 0;
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
.announcementBarContent {
|
|
37
36
|
flex: 1 1 auto;
|
|
38
|
-
font-size: 85%;
|
|
39
|
-
text-align: center;
|
|
40
|
-
padding: 5px 0;
|
|
41
37
|
}
|
|
42
38
|
|
|
43
39
|
@media print {
|
|
@@ -46,11 +42,6 @@ html[data-announcement-bar-initially-dismissed='true'] .announcementBar {
|
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
44
|
|
|
49
|
-
.announcementBarContent a {
|
|
50
|
-
color: inherit;
|
|
51
|
-
text-decoration: underline;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
45
|
@media (min-width: 997px) {
|
|
55
46
|
:root {
|
|
56
47
|
--docusaurus-announcement-bar-height: 30px;
|
|
@@ -24,7 +24,7 @@ export default function DocSidebarItemLink({
|
|
|
24
24
|
index,
|
|
25
25
|
...props
|
|
26
26
|
}: Props): JSX.Element {
|
|
27
|
-
const {href, label, className} = item;
|
|
27
|
+
const {href, label, className, autoAddBaseUrl} = item;
|
|
28
28
|
const isActive = isActiveSidebarItem(item, activePath);
|
|
29
29
|
const isInternalLink = isInternalUrl(href);
|
|
30
30
|
return (
|
|
@@ -44,6 +44,7 @@ export default function DocSidebarItemLink({
|
|
|
44
44
|
'menu__link--active': isActive,
|
|
45
45
|
},
|
|
46
46
|
)}
|
|
47
|
+
autoAddBaseUrl={autoAddBaseUrl}
|
|
47
48
|
aria-current={isActive ? 'page' : undefined}
|
|
48
49
|
to={href}
|
|
49
50
|
{...(isInternalLink && {
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -55,6 +55,22 @@ declare module '@theme/AnnouncementBar' {
|
|
|
55
55
|
export default function AnnouncementBar(): JSX.Element | null;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
declare module '@theme/AnnouncementBar/Content' {
|
|
59
|
+
import type {ComponentProps} from 'react';
|
|
60
|
+
|
|
61
|
+
export interface Props extends ComponentProps<'div'> {}
|
|
62
|
+
|
|
63
|
+
export default function AnnouncementBarContent(props: Props): JSX.Element;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare module '@theme/AnnouncementBar/CloseButton' {
|
|
67
|
+
import type {ComponentProps} from 'react';
|
|
68
|
+
|
|
69
|
+
export interface Props extends ComponentProps<'button'> {}
|
|
70
|
+
|
|
71
|
+
export default function AnnouncementBarCloseButton(props: Props): JSX.Element;
|
|
72
|
+
}
|
|
73
|
+
|
|
58
74
|
declare module '@theme/BackToTopButton' {
|
|
59
75
|
export default function BackToTopButton(): JSX.Element;
|
|
60
76
|
}
|