react-braintree-fields
Advanced tools
Comparing version 0.2.0 to 0.3.1
16
demo.jsx
import { render } from 'react-dom'; | ||
import React from 'react'; | ||
import { Braintree, Field } from './src/index'; | ||
import { Braintree, HostedField } from './src/index'; | ||
@@ -75,3 +75,3 @@ | ||
Number: | ||
<Field | ||
<HostedField | ||
type="number" | ||
@@ -84,15 +84,15 @@ onBlur={() => this.setState({ numberFocused: false })} | ||
Date: | ||
<Field type="expirationDate" /> | ||
<HostedField type="expirationDate" /> | ||
Month: | ||
<Field type="expirationMonth" /> | ||
<HostedField type="expirationMonth" /> | ||
Year: | ||
<Field type="expirationYear" /> | ||
<HostedField type="expirationYear" /> | ||
CVV: | ||
<Field type="cvv" /> | ||
<HostedField type="cvv" /> | ||
Zip: | ||
<Field type="postalCode" /> | ||
<HostedField type="postalCode" /> | ||
</div> | ||
</Braintree> | ||
<div className="footer"> | ||
<button onClick={this.getToken}>Get token</button> | ||
<button onClick={this.getToken}>Get nonce token</button> | ||
</div> | ||
@@ -99,0 +99,0 @@ </div> |
@@ -278,3 +278,3 @@ (function (global, factory) { | ||
exports.Braintree = Braintree$1; | ||
exports.Field = BraintreeHostedField; | ||
exports.HostedField = BraintreeHostedField; | ||
@@ -281,0 +281,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
@@ -271,3 +271,3 @@ import React from 'react'; | ||
export { Braintree$1 as Braintree, BraintreeHostedField as Field }; | ||
export { Braintree$1 as Braintree, BraintreeHostedField as HostedField }; | ||
//# sourceMappingURL=build.module.js.map |
{ | ||
"name": "react-braintree-fields", | ||
"version": "0.2.0", | ||
"version": "0.3.1", | ||
"description": "React component for braintree hosted fields", | ||
@@ -16,5 +16,5 @@ "main": "dist/build.full.js", | ||
"test": "$(npm bin)/jest", | ||
"build": "rollup -c", | ||
"dev": "", | ||
"prepublish": "npm run build && npm test" | ||
"ci": "./script/cibuild", | ||
"prepublish": "./script/prepublish", | ||
"preversion": "./script/preversion" | ||
}, | ||
@@ -21,0 +21,0 @@ "keywords": [ |
@@ -26,2 +26,3 @@ import babel from 'rollup-plugin-babel'; | ||
invariant: 'invariant', | ||
'prop-types': 'PropTypes', | ||
'braintree-web/client': 'Braintree', | ||
@@ -28,0 +29,0 @@ 'braintree-web/hosted-fields': 'HostedFields', |
@@ -5,3 +5,3 @@ import React from 'react'; | ||
import BraintreeClient from 'braintree-web/client'; | ||
import { Braintree, Field } from '../src/index.js'; | ||
import { Braintree, HostedField } from '../src/index.js'; | ||
@@ -20,8 +20,8 @@ jest.mock('braintree-web/client'); | ||
<div> | ||
<Field type="number" placeholder="cc #" {...props.number} /> | ||
<Field type="expirationDate" placeholder="date" {...props.expirationDate} /> | ||
<Field type="expirationMonth" placeholder="month" {...props.expirationMonth} /> | ||
<Field type="expirationYear" placeholder="year" {...props.expirationYear} /> | ||
<Field type="cvv" placeholder="cvv" {...props.cvv} /> | ||
<Field type="postalCode" placeholder="zip" {...props.postalCode} /> | ||
<HostedField type="number" placeholder="cc #" {...props.number} /> | ||
<HostedField type="expirationDate" placeholder="date" {...props.expirationDate} /> | ||
<HostedField type="expirationMonth" placeholder="month" {...props.expirationMonth} /> | ||
<HostedField type="expirationYear" placeholder="year" {...props.expirationYear} /> | ||
<HostedField type="cvv" placeholder="cvv" {...props.cvv} /> | ||
<HostedField type="postalCode" placeholder="zip" {...props.postalCode} /> | ||
</div> | ||
@@ -28,0 +28,0 @@ </Braintree> |
import Braintree from './braintree.jsx'; | ||
import Field from './field.jsx'; | ||
import HostedField from './field.jsx'; | ||
export { | ||
Braintree, | ||
Field, | ||
HostedField, | ||
}; |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2427587
33
24973
0