0.0.7 • Published 6 years ago

call1800 v0.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

call1800 is an embeddable element that allows your users make calls to 1800 numbers completely free.

Installation

via NPM (recommended)

npm install call1800

via CDN

<link rel="stylesheet" href="<ADD_LINK_HERE>">
<script src="<ADD_LINK_HERE>"></script>

Usage

Quick start

  1. Add dist/main.css to your styles.

  2. Initialize dialpad with Javascript.

import Dialpad from 'call1800'; // if you used CDN Dialpad class is available at window.Dialpad

const dialpad = new Dialpad();
dialpad.render();

Available methods

new Dialpad(options)

Creates dialpad instance with options object. You can omit options if defaults values are suitable for your use case.

Available options:

OptionDescriptionDefault valueData type
closedChanges initial state of the dialpad. If true - dialpad will be collapsed by defaultfalseBoolean

Example:

const dialpad = new Dialpad({
  closed: true,
});

dialpad.render()

Renders dialpad on page.

dialpad.call(number)

Starts a call to number. number must be a String that starts with 18xx and exactly 11 characters long.

dialpad.hangUp()

Stops active call.

dialpad.toggle()

Collapse or open dialpad.

dialpad.open()

Opens dialpad.

dialpad.close()

Collapses dialpad.

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago