diff --git a/.babelrc b/.babelrc index 4ef551af4..420173781 100644 --- a/.babelrc +++ b/.babelrc @@ -16,4 +16,4 @@ ] } } -} \ No newline at end of file +} diff --git a/.gitignore b/.gitignore index 57642d3c5..230678335 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ build -lib node_modules npm-debug.log .idea diff --git a/.nvmrc b/.nvmrc index cc2fbe89b..9e3a93350 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -4.3.2 +4.4.3 diff --git a/README.md b/README.md index 6413ab242..91413672f 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,196 @@ -# React Toolbox +# -[![npm version](https://img.shields.io/npm/v/react-toolbox.svg?style=flat-square)](https://www.npmjs.com/package/react-toolbox) -[![Build Status](http://img.shields.io/travis/react-toolbox/react-toolbox/master.svg?style=flat-square)](https://travis-ci.org/react-toolbox/react-toolbox) -[![NPM Status](http://img.shields.io/npm/dm/react-toolbox.svg?style=flat-square)](https://www.npmjs.org/package/react-toolbox) -[![react-toolbox channel on discord](https://img.shields.io/badge/discord-%23react--toolbox%20%40%20reactiflux-61dafb.svg?style=flat-square)](https://discord.gg/0ZcbPKXt5bW9FLzM) -[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/javivelasco) +[![npm version](https://img.shields.io/npm/v/react-toolbox.svg?style=flat-square)](https://www.npmjs.com/package/react-toolbox) [![Build Status](http://img.shields.io/travis/react-toolbox/react-toolbox/master.svg?style=flat-square)](https://travis-ci.org/react-toolbox/react-toolbox) [![NPM Status](http://img.shields.io/npm/dm/react-toolbox.svg?style=flat-square)](https://www.npmjs.org/package/react-toolbox) [![react-toolbox channel on discord](https://img.shields.io/badge/discord-%23react--toolbox%20%40%20reactiflux-61dafb.svg?style=flat-square)](https://discord.gg/0ZcbPKXt5bW9FLzM) [![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/javivelasco) -React Toolbox is a set of [React](http://facebook.github.io/react/) components that implement [Google's Material Design specification](https://www.google.com/design/spec/material-design/introduction.html). It's powered by [CSS Modules](https://github.com/css-modules/css-modules) and harmoniously integrates with your [webpack](http://webpack.github.io/) workflow. You can take a tour through our documentation website and try the components live! +React Toolbox is a set of [React](http://facebook.github.io/react/) components that implement [Google's Material Design specification](https://www.google.com/design/spec/material-design/introduction.html). It's powered by [CSS Modules](https://github.com/css-modules/css-modules) and harmoniously integrates with your [webpack](http://webpack.github.io/) workflow, although you can use any other module bundler. You can take a tour through our documentation website and try the components live! ## Installation React Toolbox can be installed as an [npm package](https://www.npmjs.org/package/react-toolbox): +```bash +$ npm install --save react-toolbox ``` -npm install --save react-toolbox + +## Prerequisites + +React Toolbox uses [CSS Modules](https://github.com/css-modules/css-modules) by default to import stylesheets written in [SASS](http://sass-lang.com/). In case you want to import the components already bundled with CSS, your module bundler should be able to require these SASS modules. + +Although we recommend [webpack](https://webpack.github.io/), you are free to use whatever module bundler you want as long as it can compile and require SASS files located in your `node_modules`. If you are experiencing require errors, make sure your configuration satisfies this requirement. + +Of course this is a set of React components so you should be familiar with [React](https://facebook.github.io/react/). If want to customize your components via themes, you may want to take a look to [react-css-themr](https://github.com/javivelasco/react-css-themr) which is used by React Toolbox to make component easily themeable. + +## Basic usage + +In this minimal example, we import a `Button` with styles already bundled: + +```js +import React from 'react'; +import ReactDOM from 'react-dom'; +import { Button } from 'react-toolbox/lib/button'; + +ReactDOM.render( +