UNPKG

@xapp/chat-widget

Version:
26 lines (25 loc) 867 B
import 'rollup-plugin-inject-process-env'; import { FC } from "react"; import "./SourceLinks.scss"; export interface Source { /** Display text for the source link */ readonly title: string; /** URL to open when clicked */ readonly url: string; /** Whether to open in new tab (default: true) */ readonly newTab?: boolean; } export interface SourceLinksProps { /** Array of sources to display */ readonly sources: readonly Source[]; /** Optional prefix text before the links (default: "Sources:") */ readonly prefix?: string; /** Optional callback when a source is clicked */ onSourceClick?: (source: Source) => void; } /** * Displays source links below a chat message. * Designed to be compact and unobtrusive, unlike suggestion chips. */ declare const SourceLinks: FC<SourceLinksProps>; export default SourceLinks;