alaska-field-number
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -85,4 +85,4 @@ /** | ||
NumberField.options = ['min', 'max']; | ||
NumberField.viewOptions = ['min', 'max', 'format']; | ||
NumberField.viewOptions = ['min', 'max', 'format', 'addonBefore', 'addonAfter']; | ||
module.exports = NumberField; |
@@ -110,11 +110,15 @@ 'use strict'; | ||
var errorText = _props.errorText; | ||
var help = field.help; | ||
var style = undefined; | ||
if (errorText) { | ||
style = 'error'; | ||
help = errorText; | ||
} | ||
var display = this.state.display; | ||
var help = errorText ? _react2.default.createElement( | ||
'span', | ||
{ className: 'text-danger' }, | ||
errorText | ||
) : field.note ? field.note : null; | ||
return _react2.default.createElement(_reactBootstrap.Input, { | ||
type: 'text', | ||
bsStyle: style, | ||
value: display, | ||
@@ -128,3 +132,5 @@ label: field.label, | ||
wrapperClassName: 'col-xs-10', | ||
help: help | ||
help: help, | ||
addonAfter: field.addonAfter, | ||
addonBefore: field.addonBefore | ||
}); | ||
@@ -131,0 +137,0 @@ } |
{ | ||
"name": "alaska-field-number", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Alaska number field", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
17033
245