typed-css-classes

0.2.0 • Public • Published

Installation

npm install --save typed-css-classes

Then add the ppx in your bsconfig.json file:

"ppx-flags": [
  "typed-css-classes/ppx"
]

Usage

CSS Modules

%%css.module(let css = "./styles.module.css")

@react.component
let make = () => {
  <h1 className={css["title"]}> {"Hello World!"->React.string} </h1>
}

Importing global CSS

%%css.import(let css = "./styles.css")

@react.component
let make = () => {
  <h1 className={css["title"]}> {"Hello World!"->React.string} </h1>
}

Package Sidebar

Install

npm i typed-css-classes

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

20.1 MB

Total Files

5

Last publish

Collaborators

  • ribeirotomas1904