0.0.10 • Published 4 years ago

re-tailwind v0.0.10

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

re-tailwind

ReasonML utility to generate Tailwind classes

Install

npm install --save re-tailwind

Add re-tailwind to bs-dependencies in bsconfig.json

Usage

  1. Ensure your app already import tailwind css
[%bs.raw {|require("tailwindcss/dist/tailwind.min.css")|}];
  1. Use function TW.make to construct your tailwind classnames:
module Example = {
  [@react.component]
  let make = () => {
    <div className=TW.([Display(Flex), Float(FloatRight)] |> make)>
      {ReasonReact.string("Hello Example")}
    </div>;
  };
};

More examples

Credits

  • Typed tailwind which has the same purpose to this project but in TypeScript

Next works:

  • Tailwind PPX
  • Auto generate ReasonML code for Tailwind CSS by user config

License

MIT

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago