Skip to content

Commit

Permalink
Fixed CacheProvider demo in the docs (see emotion-js#2678)
Browse files Browse the repository at this point in the history
  • Loading branch information
srmagura committed Jul 2, 2022
1 parent ab7ed91 commit ab2fbe3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/cache-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: 'CacheProvider'
It can be useful to customize emotion's options - i.e. to add custom Stylis plugins, customize prefix of inserted class names, render style tags into specific element and more. You can look up full list of options [here](/packages/cache#options).

```jsx
// @live
import { CacheProvider, css } from '@emotion/react'
import createCache from '@emotion/cache'
import { prefixer } from 'stylis'
Expand Down
2 changes: 2 additions & 0 deletions site/components/live-editor/emotion-live-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const scope: Scope = {
return require('@emotion/is-prop-valid')
case 'facepaint':
return require('facepaint')
case 'stylis':
return require('stylis')

// Not used unless the user adds a jsxImportSource directive
case 'react/jsx-runtime':
Expand Down

0 comments on commit ab2fbe3

Please sign in to comment.