@jds-jnj/react-esign
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Jds React ESign

Simplest esign component.

JDS react esign is a user-friendly react esign component.

Features

  • Simple and easy to use.

Image

esignExample

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: "amanjena@email.com", 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!

Readme

Keywords

Package Sidebar

Install

npm i @jds-jnj/react-esign

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

95.5 kB

Total Files

12

Last publish

Collaborators

  • ajena10