yarn add @leafygreen-ui/emotion
npm install @leafygreen-ui/emotion
Because we use a custom instance of Emotion to allow for styles defined in LeafyGreen to be easily overwritten, there's an additional step that must be taken to use our components when performing server-side rendering.
We expose three methods as named exports that are also exposed by the base
extractCritical. You can find documentation on usage of each of the methods in the official Emotion documentation.
NOTE: If you are already server-side rendering an application using Emotion, you will use the methods exposed in
@leafygreenui/emotioninstead of, NOT in addition to the methods exposed by
;;;const html = ;