/reason-mui-binding-generator

Reason binding generator for material-ui v1

Primary LanguageTypeScript



Reason Mui Binding Generator

This library generates bindings for material-ui. It's automatically generated by an adaption of reason-rt-binding-generator (created by astrada).

Prerequisites

The build tool assumes both the reason-mui-binding-generator and material-ui git repositories are cloned in the same parent directory. If this is not the case, modify extract/package.json to point to the correct location of your material-ui clone.

Make sure the material-ui directory is a clone, not the NPM version!!.

  1. Install reason-cli.

  2. Install JS dependencies:

    yarn install
    cd extract; yarn install
    
  3. (Re)generate bindings

    cd extract; yarn copy; yarn extract
    yarn parse
    
  4. (Re)generate ppx extension

    yarn ppx
    

The generated bindings can be found in output/reason

Todo

  • Implement the whole Theme structure & create a converter for it
  • Write a code extension for conveniently using a typesafe withStyles (2018-02-08)
  • Make the code extension work with theme => object function
  • Expose a nested Colors module (2017-11-15)
  • Think of a way to use theme => object pattern as withStyles argument(2017-11-25)
  • Add WithTheme component
  • Add ThemeProvider component
  • Implement classname overrides (2017-11-15)
  • Implement ref function signatures