UNPKG

@xapp/chat-widget

Version:
39 lines (38 loc) 1.27 kB
import 'rollup-plugin-inject-process-env'; import { FC } from "react"; import { ActionBarConfig, ActionBarFormButton, ActionBarScheduleButton } from "@xapp/stentor-chat-widget"; import "./ActionBar.scss"; export interface ActionBarProps { readonly config: ActionBarConfig; /** * Whether the chat widget is currently visible/open */ readonly visible: boolean; /** * Whether the chat widget is disabled (chat buttons should be hidden) */ readonly chatDisabled?: boolean; /** * Whether the user has already interacted with the widget * (e.g., clicked chat button, sent a message, dismissed CTA) */ readonly hasUserInteracted?: boolean; /** * Called when the chat button is clicked to open chat */ readonly onChatClick: () => void; /** * Called when the chat button is clicked to close/minimize chat */ readonly onChatMinimize: () => void; /** * Called when form or schedule button is clicked */ readonly onFormClick: (button: ActionBarFormButton | ActionBarScheduleButton) => void; /** * Called when the CTA is dismissed */ readonly onCtaDismiss?: () => void; } declare const ActionBar: FC<ActionBarProps>; export default ActionBar;