Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

astrada/reason-react-toolbox-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Examples using reason-react-toolbox

This repository contains ReasonML porting of react-toolbox-example.

Getting started

  1. Install dependencies:

    npm install --global bs-platform
    yarn install
    
  2. Generate theme files:

    yarn toolbox
    
  3. Start the demo:

    yarn start
    

How to create a new ReasonML app that uses reason-react-toolbox

  1. Setup a new app using create-react-app and reason-scripts:

    npm install -g bs-platform
    yarn create react-app <app-name> -- --scripts-version reason-scripts
    cd <app-name>
    
  2. Add dependencies:

    yarn add react-toolbox
    yarn add --dev @astrada/reason-react-toolbox react-toolbox-themr
    
  3. Add toolbox to scripts in package.json (as explained here):

    "toolbox": "react-toolbox-themr"
    
  4. Change name in bsconfig.json, and add @astrada/reason-react-toolbox to bs-dependencies

  5. Add fonts to public/index.html:

    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
  6. Wrap your component with ReactToolbox.ThemeProvider (see app.re)

  7. Generate theme files:

    yarn toolbox
    
  8. Start the app:

    yarn start
    

About

Example for reason-react-toolbox

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published