react-braintree-fields
Advanced tools
Comparing version 0.6.1 to 0.7.0
{ | ||
"name": "react-braintree-fields", | ||
"version": "0.6.1", | ||
"version": "0.7.0", | ||
"description": "React component for braintree hosted fields", | ||
@@ -5,0 +5,0 @@ "main": "dist/build.full.js", |
@@ -87,3 +87,9 @@ # React components to integrate Braintree hosted fields | ||
* placeholder - A string to that will be displayed in the input while it's empty | ||
* formatInput | ||
* maxlength, | ||
* minlength | ||
* select | ||
See the [Braintree api docs](https://braintree.github.io/braintree-web/3.19.0/module-braintree-web_hosted-fields.html#%7Efield) for more details | ||
Fields also have "focus" and "clear" methods. These may be called by obtaining a reference to the field. |
@@ -72,8 +72,12 @@ import Braintree from 'braintree-web/client'; | ||
checkInField({ type, placeholder, ...handlers }) { | ||
checkInField({ formatInput, maxlength, minlength, placeholder, select, type, ...handlers }) { | ||
const id = `field-wrapper-${this.nextFieldId()}`; | ||
this.fieldHandlers[type] = handlers; | ||
this.fields[type] = { | ||
formatInput, | ||
maxlength, | ||
minlength, | ||
placeholder, | ||
select, | ||
selector: `#${id}`, | ||
placeholder, | ||
}; | ||
@@ -80,0 +84,0 @@ return id; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
2421602
25057
95