@jds-jnj/react-esign
v1.0.1
Published
JDS react esign is a user-friendly react esign component.
Downloads
24
Readme
Jds React ESign
Simplest esign component.
JDS react esign is a user-friendly react esign component.
Features
- Simple and easy to use.
Image
Installation
JDS React Esign requires ReactJS v17+ to run.
Install the dependencies and devDependencies and start the server.
npm i @jds-jnj/react-esign
Usage
You can use the hook using:
import React, { useState } from 'react'
import { CredentialVerification, CredentialVerificationState } from "@jds-jnj/react-esign";
const JDSESign = () => {
const [showEsign, setShowEsign] = useState(false);
return (
<>
<CredentialVerification
open={showEsign}
setOpen={setShowEsign}
title="Application Protection : Credential Verification"
subTitle="To continue, please verify your credentials."
publisher="J&J Data Studio (JDS)"
confirmationMessage="I understand the Email and Password for electronic approval is equivalent of my handwritten signature and I agree to the Terms and Conditions of the J&J Data Studio (JDS) application."
data={{ userEmail: "[email protected]", password: "12345678" }}
options={['As an Approver, I approve this record.', 'As an Approver, I reject this record.']}
onSubmit={async (item: CredentialVerificationState) => { console.log(item); }}
/>
<button onClick={() => {
setShowEsign(true);
}}>Show Esign</button>
</>
);
}
Props
JDS React ESign has the following props:
- open: It is used to open the component.
- setOpen: It is used to close the component.
- title: It specifies the title of the dialog.
- subTitle: It specifies the subtitle of the dialog.
- publisher: It specifies the publisher of the dialog.
- confirmationMessage: It specifies the confirmation message of the dialog.
- data: It specifies the data of the component.
- options: It specifies the options of the reason field.
- onSubmit: It specifies the onSubmit function of the component.
License
MIT
Free Software, Hell Yeah!