0.0.10 • Published 2 years ago

v9helper-babel-plugin-shorthands v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Babel plugin to identify CSS shorthands in makeStyles call and transform it.

import { transformShorthandsPlugin } from "v9helper-babel-plugin-shorthands";

const result = Babel.transform(
  `
export const useStyles = makeStyles({
  root: {
    border: \`0.1rem solid red\`
  }
});
`,
  {
    filename: "styles.ts",
    plugins: [[transformShorthandsPlugin]],
  }
).code;

result will be:

export const useStyles = makeStyles({
  root: {
    ...shorthands.border("0.1rem", "solid", "red"),
  },
});
0.0.10

2 years ago

0.0.9

2 years ago

0.0.7

3 years ago

0.0.5

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1-20220331

3 years ago