From d529392014f7711a9902e0b51879419727bb1408 Mon Sep 17 00:00:00 2001 From: Me Date: Tue, 20 Oct 2015 14:29:28 +0100 Subject: [PATCH] Add formsy-react dependency (previously assumed it was already installed) --- README.md | 178 +++++++++++++++++++++++++++------------------------ package.json | 16 ++++- 2 files changed, 106 insertions(+), 88 deletions(-) diff --git a/README.md b/README.md index 105301f..5bac46e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ # formsy-material-ui -A [formsy-react](https://github.com/christianalfoni/formsy-react) compatibility wrapper for [Material-UI](http://material-ui.com/) form components. +[formsy-react](https://github.com/christianalfoni/formsy-react) is a form validation component for React forms. +This is a wrapper for [Material-UI](http://material-ui.com/) form components to allow them to be used with formsy-react. + +## Installation + +`$ npm install formsy-material-ui` + +Note: For React 0.13.x compatibility, specify formsy-react 0.14.1 in your app. ## Usage @@ -26,10 +33,10 @@ var FormsyToggle = FMUI.FormsyToggle; ### Examples -#### App -[Example app](https://github.com/mbrookes/formsy-mui-demo) +#### Example App +[Live demo](http://formsy-material-ui.meteor.com), code: [formsy-material-ui](https://github.com/mbrookes/formsy-mui-demo) -#### Code +#### Example Code ```jsx const FMUI = require('formsy-material-ui'); const { FormsyCheckbox, FormsyDate, FormsyRadio, FormsyRadioGroup, FormsySelect, FormsyText, FormsyTime, FormsyToggle } = FMUI; @@ -114,89 +121,89 @@ const Form = React.createClass({ let { wordsError, numericError, urlError } = this.errorMessages; return ( - - - - - - + + - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + ); } }); @@ -214,8 +221,9 @@ it does correctly affect `canSubmit` state however, so use that to disable the s * 0.1.1 Fix exports * 0.1.2 Babelify same! * 0.1.3 Fix Checkbox & Toggle to return value when unchanged, don't import all of MUI (!), update example in README. +* 0.1.4 Add formsy-react dependency (previously assumed it was already installed) ## Acknowledgements -Based on an example from: [Ryan Blakeley](https://github.com/rblakeley) \ No newline at end of file +Based on an example from [Ryan Blakeley](https://github.com/rblakeley). \ No newline at end of file diff --git a/package.json b/package.json index 6980416..e29b81e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "formsy-material-ui", - "version": "0.1.3", - "description": "A Formsy wrapper for Material-UI form components", + "version": "0.1.4", + "description": "A formsy-react compatibility wrapper for Material-UI form components.", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" @@ -10,8 +10,18 @@ "type": "git", "url": "git+https://github.com/mbrookes/formsy-material-ui.git" }, + "files": [ + "index.js", + "README.md", + "LICENSE" + ], + "dependencies": { + "formsy-react": ">=0.14.1 <1" + }, "keywords": [ "formsy", + "formsy-react", + "form,", "MUI", "Material-UI", "React", @@ -23,4 +33,4 @@ "url": "https://github.com/mbrookes/formsy-material-ui/issues" }, "homepage": "https://github.com/mbrookes/formsy-material-ui#readme" -} \ No newline at end of file +}