From 2d3d7dd1d8b0de9dbfd50e42ee716ac00fb70ecd Mon Sep 17 00:00:00 2001 From: Peng Xiao Date: Thu, 10 Mar 2022 21:16:02 +0800 Subject: [PATCH] Fixed `CacheProvider` demo in the docs (#2678) * docs: fix cache-provider demo rendering * docs: fix cache-provider mdx * docs: add stub implementation of customPlugin --- docs/cache-provider.mdx | 2 ++ site/src/components/Playground.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/cache-provider.mdx b/docs/cache-provider.mdx index 4d3f87264..62e48c3c5 100644 --- a/docs/cache-provider.mdx +++ b/docs/cache-provider.mdx @@ -11,6 +11,8 @@ import { CacheProvider, jsx, css } from '@emotion/react' import createCache from '@emotion/cache' import { prefixer } from 'stylis' +const customPlugin = () => {} + const myCache = createCache({ key: 'my-prefix-key', stylisPlugins: [ diff --git a/site/src/components/Playground.js b/site/src/components/Playground.js index 580692d2c..194c4d630 100644 --- a/site/src/components/Playground.js +++ b/site/src/components/Playground.js @@ -31,6 +31,8 @@ export const scope = { return require('@emotion/is-prop-valid') case 'facepaint': return require('facepaint') + case 'stylis': + return require('stylis') default: // eslint-disable-next-line no-throw-literal throw `Module "${moduleName}" not found`