@doctolib/react-form
Advanced tools
Comparing version 1.2.0 to 1.3.0
'use strict'; | ||
exports.__esModule = true; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
@@ -9,2 +7,4 @@ | ||
exports.__esModule = true; | ||
var _react = require('react'); | ||
@@ -11,0 +11,0 @@ |
'use strict'; | ||
exports.__esModule = true; | ||
var _stringify = require('babel-runtime/core-js/json/stringify'); | ||
@@ -17,2 +15,4 @@ | ||
exports.__esModule = true; | ||
var _react = require('react'); | ||
@@ -19,0 +19,0 @@ |
'use strict'; | ||
exports.__esModule = true; | ||
exports.addValidationRule = exports.Form = exports.InputAddon = exports.CheckboxGroup = exports.RadioGroup = exports.Textarea = exports.Select = exports.Input = exports.ControlWrapper = undefined; | ||
exports.addValidationRule = exports.Form = exports.HOC = exports.InputAddon = exports.CheckboxGroup = exports.RadioGroup = exports.Textarea = exports.Select = exports.Input = exports.ControlWrapper = undefined; | ||
@@ -11,3 +11,3 @@ var _ControlWrapper = require('./ControlWrapper'); | ||
get: function get() { | ||
return _ControlWrapper.default; | ||
return _interopRequireDefault(_ControlWrapper).default; | ||
} | ||
@@ -21,3 +21,3 @@ }); | ||
get: function get() { | ||
return _Input.default; | ||
return _interopRequireDefault(_Input).default; | ||
} | ||
@@ -31,3 +31,3 @@ }); | ||
get: function get() { | ||
return _Select.default; | ||
return _interopRequireDefault(_Select).default; | ||
} | ||
@@ -41,3 +41,3 @@ }); | ||
get: function get() { | ||
return _Textarea.default; | ||
return _interopRequireDefault(_Textarea).default; | ||
} | ||
@@ -51,3 +51,3 @@ }); | ||
get: function get() { | ||
return _RadioGroup.default; | ||
return _interopRequireDefault(_RadioGroup).default; | ||
} | ||
@@ -61,3 +61,3 @@ }); | ||
get: function get() { | ||
return _CheckboxGroup.default; | ||
return _interopRequireDefault(_CheckboxGroup).default; | ||
} | ||
@@ -71,6 +71,15 @@ }); | ||
get: function get() { | ||
return _InputAddon.default; | ||
return _interopRequireDefault(_InputAddon).default; | ||
} | ||
}); | ||
var _HOC = require('./HOC'); | ||
Object.defineProperty(exports, 'HOC', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_HOC).default; | ||
} | ||
}); | ||
var _formsyReact = require('formsy-react'); | ||
@@ -77,0 +86,0 @@ |
'use strict'; | ||
exports.__esModule = true; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
@@ -9,2 +7,4 @@ | ||
exports.__esModule = true; | ||
var _react = require('react'); | ||
@@ -11,0 +11,0 @@ |
'use strict'; | ||
exports.__esModule = true; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
@@ -13,2 +11,4 @@ | ||
exports.__esModule = true; | ||
var _react = require('react'); | ||
@@ -15,0 +15,0 @@ |
'use strict'; | ||
exports.__esModule = true; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
@@ -9,2 +7,4 @@ | ||
exports.__esModule = true; | ||
var _react = require('react'); | ||
@@ -11,0 +11,0 @@ |
'use strict'; | ||
exports.__esModule = true; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
@@ -9,2 +7,4 @@ | ||
exports.__esModule = true; | ||
var _react = require('react'); | ||
@@ -11,0 +11,0 @@ |
'use strict'; | ||
exports.__esModule = true; | ||
var _extends2 = require('babel-runtime/helpers/extends'); | ||
@@ -9,2 +7,4 @@ | ||
exports.__esModule = true; | ||
var _react = require('react'); | ||
@@ -11,0 +11,0 @@ |
{ | ||
"name": "@doctolib/react-form", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Set of React form components based on react-formsy.", | ||
@@ -31,3 +31,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@doctolib/gulp-tasks": "^3.0.0", | ||
"@doctolib/gulp-tasks": "^4.0.0", | ||
"babel-eslint": "^5.0.0-beta6", | ||
@@ -34,0 +34,0 @@ "babel-plugin-transform-runtime": "^6.3.13", |
@@ -26,2 +26,12 @@ # react-form | ||
### HOC | ||
Wrapper used to create custom control compatible with react-form validation. | ||
All props, states and methods are accessible via props in the wrapped component. | ||
```js | ||
import {HOC} from '@doctolib/react-form'; | ||
const Component = HOC((...props) => <input {...props} />); | ||
``` | ||
### Input | ||
@@ -67,6 +77,35 @@ | ||
); | ||
``` | ||
### RadioGroup | ||
Group of radios. | ||
```js | ||
import {RadioGroup} from '@doctolib/react-form'; | ||
const Component = () => ( | ||
<RadioGroup | ||
name="radio" | ||
options={{value: 'Label'}} | ||
/> | ||
); | ||
``` | ||
### CheckboxGroup | ||
Group of checkboxes. | ||
```js | ||
import {CheckboxGroup} from '@doctolib/react-form'; | ||
const Component = () => ( | ||
<CheckboxGroup | ||
name="checkbox" | ||
options={{value: 'Label'}} | ||
/> | ||
); | ||
``` | ||
## License | ||
MIT |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27457
12
633
110