Skip to content

Commit 69a5e36

Browse files
committed
🐛 fix(Prism): Update usage of prism-react-renderer
1 parent c837700 commit 69a5e36

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/docusaurus.config.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
const lightCodeTheme = require("prism-react-renderer/themes/okaidia");
5-
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
4+
import { Highlight, themes } from "prism-react-renderer";
65

76
/** @type {import('@docusaurus/types').Config} */
87
const config = {
@@ -145,11 +144,11 @@ const config = {
145144
copyright: `Copyright © ${new Date().getFullYear()} Teclado Ltd. Built with Docusaurus.`,
146145
},
147146
prism: {
148-
theme: lightCodeTheme,
149-
darkTheme: darkCodeTheme,
147+
theme: themes.okaidia,
148+
darkTheme: themes.dracula,
150149
additionalLanguages: ["docker"],
151150
},
152151
}),
153152
};
154153

155-
module.exports = config;
154+
export default config;

0 commit comments

Comments
 (0)