Skip to content

Commit 4b82227

Browse files
committed
Add glossary tooltip function
1 parent 096da59 commit 4b82227

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/theme/MDXContent/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ import React from 'react';
22
import MDXContent from '@theme-original/MDXContent';
33
import type MDXContentType from '@theme/MDXContent';
44
import type {WrapperProps} from '@docusaurus/types';
5+
import GlossaryInjector from '../../../src/components/GlossaryInjector';
56

67
type Props = WrapperProps<typeof MDXContentType>;
78

8-
export default function MDXContentWrapper(props: Props): JSX.Element {
9+
export default function MDXContentWrapper(props: Props, { children }): JSX.Element {
910
return (
1011
<>
1112
<MDXContent {...props} />
13+
<GlossaryInjector>
14+
{children}
15+
</GlossaryInjector>
1216
</>
1317
);
1418
}

0 commit comments

Comments
 (0)