Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ambar/prism-react-renderer-vars

Use Prism themes with CSS vars to avoid flashing on the initial page load.
https://github.com/ambar/prism-react-renderer-vars

docusaurus prism-react-renderer

Last synced: 12 days ago
JSON representation

Use Prism themes with CSS vars to avoid flashing on the initial page load.

Awesome Lists containing this project

README

        

# prism-react-renderer-vars

Use Prism themes with CSS vars to avoid flashing on the initial page load.

## Install

```
npm install prism-react-renderer-vars
```

## Demo

Use in Docusaurus:

```js
const {light, dark} = require('prism-react-renderer-vars/themes/vs')

/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
themeConfig: {
prism: {
theme: light,
darkTheme: dark,
},
},
clientModules: [
require.resolve('prism-react-renderer-vars/themes/vs.css')
],
}
```