@ikonintegration/react-slaask
v0.0.1
Published
Slaask component for react
Downloads
1
Readme
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} />
);
}
| prop | description | | ------------ | ------------------------------------------------- | | widgetKey | The widgetKey you can obtain via slaask | | userInfo | Info 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.
}
}