0.0.1 • Published 2 years ago

@ikonintegration/react-slaask v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

React Slaask

This package is based on react-slaask. This component implements the Slaask widget with the provided properties using react.

Installation

npm install @ikonintegration/react-slaask --save

Next, import the component into a React project:

import Slaask from '@ikonintegration/react-slaask';

Usage of the component

render() {
return (
<Slaask widgetKey="your-widget-key" userInfo={object} />
);
}
propdescription
widgetKeyThe widgetKey you can obtain via slaask
userInfoInfo of the person sending you a message

Example userInfo object

{
  /* Mandatory metadata */
  user_hash: ____,         // Avoid user impersonation
  id: ____,                // User ID (Mandatory)
  name: ____,              // Your user's full name

  /* Recommended metadata */
  email: ____,             // Your user's email address
  avatar: ____,            // Your user's profile picture

  /* You are free to add anything you want */
  super_cool_person: ____, // Boolean (true / false)
  company: {
    created_at: ____       // Use timestamps for date attributes.
  }
}