0.0.32 • Published 3 years ago

@womply/connect v0.0.32

Weekly downloads
79
License
MIT
Repository
github
Last release
3 years ago

Connector TypeScript Library

Integrate Womply services with your web Application using this library by following any of the methods described below.

Importing library

Install npm package

npm install @womply/connect

Import into your application

import Womply from '@womply/connect'

Configure the UI Component by passing the required parameters and callbacks.

  var womplyWidget = Womply.connect({
      key: 'my-api-key',
      onCancel: function (e: any) {
        // listen to cancel event
      },
      onSuccess: function (e: any) {
        // listen to success event
      },
      onError: function (e: any) {
        // listen to error events
      },
  })

This will create a UI Component element within the page and you can control it with the methods described below

  // Display the widget on the screen
  womplyWidget.open(
    {
      email_address: 'useremail@domain.com'
      first_name: 'user name'
      last_name: 'last'
      phone_number: '4153556754'
    }
  )
  // close UI Component
  womplyWidget.close()
  // remove all resources
  womplyWidget.destroy()  

You can also use the CDN version directly from https://unpkg.com/@womply/connect@version/dist/connect.js and just follow the steps described before.

<!-- Example using version 0.0.1 -->
<script src="https://unpkg.com/@womply/connect@0.0.26/dist/connect.js"></script>
0.0.32

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.29

3 years ago

0.0.28

3 years ago

0.0.27

3 years ago

0.0.26

3 years ago

0.0.25

3 years ago

0.0.24

3 years ago

0.0.23

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago