UNPKG

@botonic/react

Version:

Build Chatbots using React

43 lines (42 loc) 1.36 kB
export type IndexMode = 'number' | 'letter' | undefined; export interface MultichannelViewOptions { boldIndex?: boolean; indexSeparator?: string; } export interface MultichannelContextType extends MultichannelViewOptions { currentIndex: number | string; /** @see same field at MultichannelProps */ messageSeparator?: string; } export interface MultichannelTextProps extends MultichannelViewOptions { index?: string; indexMode?: IndexMode; /** Defaults to no separator between lines*/ newline?: string; buttonsAsText?: boolean; buttonsTextSeparator?: string; menuButtonTextWhatsappList?: string; } export interface MultichannelCarouselProps extends MultichannelViewOptions { enableURL?: boolean; } export interface MultichannelButtonProps { newline?: string; path?: string; payload?: string; url?: string; webview?: string; asText?: boolean; } export interface MultichannelProps extends MultichannelViewOptions { firstIndex?: number | string; carousel?: MultichannelCarouselProps; text?: MultichannelTextProps; /** * If undefined, each component will be served in a different botonic message * '' will concatenate in the same line * '\n' will split in different lines * '\n\n' will separate with an empty line **/ messageSeparator?: string; }