@@ -2,6 +2,7 @@ import React, { CSSProperties, memo } from 'react'
22
33import useProvider from '../../hooks/useProvider'
44import useChat from '../../hooks/useChat'
5+ import { ProviderProps , ClassNames } from '../../types'
56
67const styles : CSSProperties = {
78 appearance : 'none' ,
@@ -24,7 +25,7 @@ const styles: CSSProperties = {
2425 userSelect : 'none'
2526}
2627
27- interface Props {
28+ interface Props extends ProviderProps {
2829 themeColor ?: string
2930 loggedInGreeting ?: string
3031 loggedOutGreeting ?: string
@@ -34,7 +35,6 @@ interface Props {
3435 greetingDialogDelay ?: string
3536 greetingDialogDisplay ?: string
3637 color ?: string
37- className ?: string
3838}
3939
4040interface ChatProps extends Props {
@@ -70,10 +70,10 @@ const CustomerChat = memo(
7070
7171const Widget = ( {
7272 color,
73- className
73+ containerClass
7474} : {
7575 color : string
76- className : string
76+ containerClass : string
7777} ) : JSX . Element | null => {
7878 const [ state , loadChat ] = useChat ( { loadWhenIdle : true } )
7979
@@ -83,7 +83,7 @@ const Widget = ({
8383
8484 return (
8585 < div
86- className = { className }
86+ className = { containerClass }
8787 style = { styles }
8888 role = "button"
8989 aria-label = "Load Chat"
@@ -114,15 +114,15 @@ const Widget = ({
114114
115115const Messenger = ( {
116116 color = '' ,
117- className = 'live-chat-loader-placeholder' ,
117+ containerClass = ClassNames . container ,
118118 ...props
119119} : Props ) : JSX . Element => {
120120 const { providerKey } = useProvider ( )
121121
122122 return (
123123 < >
124124 < CustomerChat color = { color } providerKey = { providerKey } { ...props } />
125- < Widget color = { color } className = { className } />
125+ < Widget color = { color } containerClass = { containerClass } />
126126 </ >
127127 )
128128}
0 commit comments