diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-02-08 15:12:34 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-02-08 15:13:41 +0100 |
| commit | 5597ff486dba9d0ea9fb4a0acfdb73c690859147 (patch) | |
| tree | 0f1774a7be5616363790a0dba9246cb55c1d98f1 /src/components | |
| parent | 5d79523eba4ec0a89668b904dc7896c843ab8dd6 (diff) | |
chore(prism): translate color scheme toggle button
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/MDX/CodeBlock/CodeBlock.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/components/MDX/CodeBlock/CodeBlock.tsx b/src/components/MDX/CodeBlock/CodeBlock.tsx index 0c66311..2f9715d 100644 --- a/src/components/MDX/CodeBlock/CodeBlock.tsx +++ b/src/components/MDX/CodeBlock/CodeBlock.tsx @@ -1,5 +1,8 @@ import { settings } from '@utils/config'; -import { translateCopyButton } from '@utils/helpers/prism'; +import { + translateCopyButton, + translateToggleButton, +} from '@utils/helpers/prism'; import { useRouter } from 'next/router'; import Prism from 'prismjs'; import { ReactChildren, useEffect } from 'react'; @@ -28,6 +31,7 @@ const CodeBlock = ({ useEffect(() => { translateCopyButton(locale, intl); + translateToggleButton(locale, intl); }, [intl, locale]); const { setCodeBlocks } = usePrismTheme(); |
