v0.0.1
Emotion CSS-in-JS for Fresh
Attributes
Includes Deno configuration
Repository
Current version released
3 years ago
Versions
Fresh Emotion
A plugin for Fresh that allows you to use
Emotion for styling. Doesn’t use
@emotion/react but @emotion/css instead.
Usage
In your
main.ts, import the plugin:import { emotionPlugin } from "https://deno.land/x/fresh_emotion/mod.ts"; // Then use it with Fresh. await start(manifest, { plugins: [ emotionPlugin(), ], });
In a Component, e.g.
components/MyComponent.tsx:import { css, cx } from "https://deno.land/x/fresh_emotion/mod.ts"; export function MyComponent() { return ( <div className={cx( css({ color: "yellow", backgroundColor: "hotpink", }), )} > <p>CSS-in-Fresh!</p> </div> ); }