File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ interface Props {
3434 greetingDialogDelay ?: string
3535 greetingDialogDisplay ?: string
3636 color ?: string
37+ className ?: string
3738}
3839
3940interface ChatProps extends Props {
@@ -67,7 +68,13 @@ const CustomerChat = memo(
6768 }
6869)
6970
70- const Widget = ( { color } : { color : string } ) : JSX . Element | null => {
71+ const Widget = ( {
72+ color,
73+ className
74+ } : {
75+ color : string
76+ className : string
77+ } ) : JSX . Element | null => {
7178 const [ state , loadChat ] = useChat ( { loadWhenIdle : true } )
7279
7380 if ( state === 'complete' ) {
@@ -76,6 +83,7 @@ const Widget = ({ color }: { color: string }): JSX.Element | null => {
7683
7784 return (
7885 < div
86+ className = { className }
7987 style = { styles }
8088 role = "button"
8189 aria-label = "Load Chat"
@@ -104,13 +112,17 @@ const Widget = ({ color }: { color: string }): JSX.Element | null => {
104112 )
105113}
106114
107- const Messenger = ( { color = '' , ...props } : Props ) : JSX . Element => {
115+ const Messenger = ( {
116+ color = '' ,
117+ className = 'live-chat-loader-placeholder' ,
118+ ...props
119+ } : Props ) : JSX . Element => {
108120 const { providerKey } = useProvider ( )
109121
110122 return (
111123 < >
112124 < CustomerChat color = { color } providerKey = { providerKey } { ...props } />
113- < Widget color = { color } />
125+ < Widget color = { color } className = { className } />
114126 </ >
115127 )
116128}
You can’t perform that action at this time.
0 commit comments