File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ You can pass the following props to the `LiveChatLoaderProvider` provider:
132132
133133## 💬 Supported Providers
134134
135- Currently there are six supported providers:
135+ Currently there are seven supported providers:
136136
137137<details >
138138<summary id =" help-scout " >Help Scout</summary >
@@ -347,6 +347,39 @@ You can customise the Chatwoot placeholder by passing the following props to the
347347
348348</details >
349349
350+ <details >
351+ <summary id =" hubspot " >Hubspot</summary >
352+
353+ To use Hubspot import the ` LiveChatLoaderProvider ` and set the ` provider ` prop
354+ as ` hubSpot ` and the ` providerKey ` prop as your Hubspot API Key.
355+
356+ Then import the ` Hubspot ` component.
357+
358+ ``` jsx
359+ import { LiveChatLoaderProvider , Hubspot } from ' react-live-chat-loader'
360+
361+ export default class App extends React .Component {
362+ render () {
363+ return (
364+ < LiveChatLoaderProvider providerKey= " asdjkasl123123" provider= " hubspot" >
365+ /* ... */
366+ < Hubspot / >
367+ < / LiveChatLoaderProvider>
368+ )
369+ }
370+ }
371+ ```
372+
373+ You can customise the Hubspot placeholder by passing the following props to the
374+ ` Hubspot ` component:
375+
376+ - ` backgroundColor ` : The background color of the placeholder
377+ - ` loader ` : A react component shown while the Hubspot libraries are loading
378+
379+ </details >
380+
381+ <details >
382+
350383## ➕ Adding a Provider
351384
352385To add a new live chat provider, follow the steps in [ Contributing: Adding a Provider] ( CONTRIBUTING.md#-adding-a-provider ) .
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ const ExampleLinks = () => (
3333 < a > Chatwoot</ a >
3434 </ Link >
3535 </ li >
36+ < li >
37+ < Link href = "/hubspot" >
38+ < a > HubSpot</ a >
39+ </ Link >
40+ </ li >
3641 </ ul >
3742)
3843
Original file line number Diff line number Diff line change 1+ import React from 'react'
2+ import { LiveChatLoaderProvider , HubSpot } from 'react-live-chat-loader'
3+ import type { NextPage } from 'next'
4+
5+ import Layout from '../layouts/main'
6+ import ExampleLinks from '../components/exampleLinks'
7+
8+ const Page : NextPage = ( ) => (
9+ < LiveChatLoaderProvider
10+ provider = "hubSpot"
11+ providerKey = ""
12+ >
13+ < Layout title = "React Live Chat Loader: Hubspot" >
14+ < div className = "wrapper" >
15+ < div className = "inner" >
16+ < h1 > React Live Chat Loader: Hubspot</ h1 >
17+ < p >
18+ This is an example implementation of the Hubspot widget using{ ' ' }
19+ < a href = "https://github.com/calibreapp/react-live-chat-loader" >
20+ react-live-chat-loader
21+ </ a >
22+ .
23+ </ p >
24+ < p > View other demos:</ p >
25+ < ExampleLinks />
26+ </ div >
27+ </ div >
28+ < HubSpot backgroundColor = '#017848' />
29+ </ Layout >
30+ </ LiveChatLoaderProvider >
31+ )
32+
33+ export default Page
You can’t perform that action at this time.
0 commit comments