1.0.3 • Published 5 years ago

usersnap-classic-component v1.0.3

Weekly downloads
121
License
ISC
Repository
-
Last release
5 years ago

Usersnap Classic Component

Installation

npm install --save usersnap-classic-component

How To Use

First import this component where you want to use it

import UsersnapClassicLoader from "usersnap-classic-component"

Then just use it in your render method like this

<UsersnapClassicLoader apikey="YOUR-APIKEY" />

Props

PropDescriptionDefault value
apiKeyAPI Key of your classic project""
configCustom configuration for the widget{}
exposeAPIWhen true, the API will be exposed to window.Usersnapfalse

Please note that a valid apikey is required to load the Usersnap Classic Widget correctly. The apikey can be found in the settings of your Usersnap Classic Project.

Examples

import React, { Component } from "react";
import UsersnapClassicLoader from "usersnap-classic-component";

class App extends Component {
  render() {
    return (
        <UsersnapClassicLoader apiKey="YOUR-APIKEY" />
    );
  }
}

export default App;

Exposing the API

import React, { Component } from "react";
import UsersnapClassicLoader from "usersnap-classic-component";

class App extends Component {
  render() {
    return (
        <UsersnapClassicLoader apiKey="YOUR-APIKEY" exposeAPI={true}/>
    );
  }
}

export default App;

Now you can control the widget via the API and open it like so: window.Usersnap.open() For more information on how to use the API please have a look here: https://help.usersnap.com/docs/api-for-usersnap-classic-new

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago