UNPKG

@livechat/widget-react

Version:

This library allows to render and interact with the LiveChat Chat Widget inside a React application

23 lines (15 loc) 894 B
import { WidgetState, CustomerData, ChatData, Greeting, WidgetConfig } from '@livechat/widget-core'; export { ChatData, ChatEvent, CustomerData, EventHandlerPayload, RichMessageButton, WidgetConfig, WidgetState } from '@livechat/widget-core'; declare function useWidgetIsReady(): boolean; declare function useWidgetState(): WidgetState | null; declare function useWidgetCustomerData(): CustomerData | null; declare function useWidgetChatData(): ChatData | null; declare function useWidgetGreeting(): Greeting | null; declare type Props = Omit<WidgetConfig, 'organizationId' | 'license'> & ({ organizationId: string; } | { license: string; }); declare function TextWidget(props: Props): null; declare function LiveChatWidget(props: Props): null; export { LiveChatWidget, TextWidget, useWidgetChatData, useWidgetCustomerData, useWidgetGreeting, useWidgetIsReady, useWidgetState };