@starrnx/puck-plugin-emotion-cache
v0.16.0-canary.ffc4536
Published
Inject [emotion cache](https://emotion.sh/docs/@emotion/cache) into the Puck iframe.
Readme
plugin-emotion-cache
Inject emotion cache into the Puck iframe.
Quick start
npm i @measured/puck-plugin-emotion-cacheimport { Puck } from "@measured/puck";
import createEmotionCache from "@measured/puck-plugin-emotion-cache";
// Create your emotion cache plugin. This example configures it for Chakra.
const chakraEmotionCache = createEmotionCache("cha");
// Render Puck
export function Page() {
return <Puck config={config} data={data} plugins={[chakraEmotionCache]} />;
}Args
| Param | Example | Type | Status |
| ------------- | ------- | ------ | -------- |
| key | cha | String | Required |
Required args
key
Key to pass to Emotion's createCache method.
License
MIT © Measured Corporation Ltd
