phthhieu / re-tailwind

Brings TailwindCSS https://tailwindcss.com to ReasonML
https://phthhieu.github.io/re-tailwind
MIT License
119 stars 2 forks source link

Support responsiveness #9

Closed phthhieu closed 4 years ago

phthhieu commented 4 years ago

Resolves #8

Sm, Md, Lg, Xl now are new TW variant to construct tailwind responsive class. Eg:

let str = ReasonReact.string;

[@react.component]
let make = () => {
  <div
    className=TW.(
      [
        Width(W10),
        Height(H10),
        BackgroundColor(BgRed500),
        Sm(BackgroundColor(BgGreen500)),
        Lg(BackgroundColor(BgPink500)),
        Xl(BackgroundColor(BgTeal500)),
      ]
      |> make
    )
  />;
};