0.0.10 • Published 11 months ago

v9helper-babel-plugin-shorthands v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months 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

11 months ago

0.0.9

1 year ago

0.0.7

2 years ago

0.0.5

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1-20220331

2 years ago