babel-plugin-stitches
v0.0.2
Published
Babel plugin to add readable className to your styled component
Maintainers
Readme
babel-plugin-stitches
Input
let foo = styled("div", {});Output
let foo = styled.withConfig({ displayName: "foo" })("div", {});Installation
- Install packages
$ npm install @stitches/[email protected] babel-plugin-stitches- Extend babelrc .babelrc
{
"plugins": ["stitches"]
}- Use createStitches
import { createStitches } from "@stitches/react";
// Using createStitches is required!!!
const { styled } = createStitches();
const StyledForm = styled("form", {
background: "red",
});Acknowledgements
This plugin is adapted from @babel/plugin-transform-react-display-name many thanks to the Babel team.
