@anvilco/react-signature-modal
Advanced tools
Comparing version 1.4.0 to 1.4.1
{ | ||
"name": "@anvilco/react-signature-modal", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "The AnvilSignatureModal React component for embedded Etch signatures", | ||
"author": "Anvil Foundry Inc.", | ||
"license": "MIT", | ||
"main": "lib/index.js", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
@@ -35,3 +35,4 @@ "build": "webpack --mode production", | ||
"react": "^16.8.0", | ||
"react-dom": "^16.8.0" | ||
"react-dom": "^16.8.0", | ||
"react-modal": "^3.11.2" | ||
}, | ||
@@ -41,5 +42,6 @@ "peerDependencies": { | ||
"react": "^16.8.0", | ||
"react-dom": "^16.8.0" | ||
"react-dom": "^16.8.0", | ||
"react-modal": "^3.11.2" | ||
}, | ||
"gitHead": "7ec62ef64e620054e72743cfc98e808d9ae7993c" | ||
"gitHead": "bda11ca1d4be0591594f08dd3ef157a8c2ff35d1" | ||
} |
# AnvilSignatureModal | ||
A lightweight modal component that handles the [Anvil Etch](https://www.useanvil.com/etch-free-e-signatures) signing lifecycle. Compatible with mobile viewports with minimal dependencies. | ||
A modal component that handles the signing process lifecycle. Compatible with mobile viewports with minimal dependencies. | ||
## Usage | ||
``` | ||
yarn add @anvilco/react-signature-modal | ||
``` | ||
``` | ||
npm install @anvilco/react-signature-modal | ||
``` | ||
## Usage: | ||
```js | ||
import AnvilSignatureModal from '@anvilco/react-signature-modal' | ||
import AnvilSignatureFrame from '@anvilco/react-signature-modal' | ||
import '@anvilco/react-signature-modal/dist/styles.css' | ||
@@ -19,1 +26,74 @@ <AnvilSignatureModal | ||
``` | ||
### Props | ||
#### signURL | ||
##### string (required) | ||
A URL to the Anvil signature page generated from the `generateEtchSignURL` GraphQL mutation. The signature frame will be displaying the signing page through this URL. | ||
Example: | ||
```js | ||
signURL={`https://app.useanvil.com/etch/8iJDbq8dkEmjrsNw7Dnb/sign?token=dsa...`} | ||
``` | ||
#### isOpen | ||
##### boolean | ||
The modal is displayed if `isOpen` is true. | ||
#### onClose | ||
##### function | ||
This function is called when the X button is clicked on the top right corner. | ||
Example: | ||
```js | ||
onClose={() => setIsOpen(false))} | ||
``` | ||
#### onLoad | ||
##### function | ||
This function is called when the signing page has finished loading. | ||
Example: | ||
```js | ||
onLoad={() => setLoading(false)} | ||
``` | ||
#### onFinish | ||
##### function | ||
This function takes the `redirectURL` as a parameter; called when a user has finished signing. | ||
Example: | ||
This is called by default if not defined otherwise. | ||
```js | ||
onFinish={(redirectURL) => window.location.assign(redirectURL)} | ||
``` | ||
#### width | height | ||
##### number | string | ||
The width/height of the iframe in CSS pixels. Default is 900w by 1100h. | ||
## Styling | ||
Styles are not embedded into the React component to support customization. The default styles are provided within the modules under `dist/styles.css`. | ||
## Anvil Etch E-Sign Docs | ||
[Read the Docs](https://www.useanvil.com/docs/api/e-signatures) | ||
## Notes | ||
* The `allowFormEmbed` config must be set to `true` under your [Anvil organization](https://useanvil.com) for embedded signing. Please reach us at [support@useanvil.com](mailto:hello@useanvil.com). | ||
* React ^v16.8.0 is required. | ||
## Bugs | ||
Please file an issue for bugs, missing documentation, or unexpected behavior. | ||
## Questions or Feedback | ||
Please email us at [hello@useanvil.com](mailto:hello@useanvil.com). |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
30978
6
99
4
4
1
80
40