vue3-chat-yz
Version:
vue3-chat-yz
40 lines (39 loc) • 972 B
TypeScript
import { VNode, CSSProperties } from 'vue';
export interface TypingOption {
/**
* @default 50
*/
interval?: number;
/**
* @default 1
*/
step?: number;
}
export interface BubbleProps {
avatar?: string | VNode;
className?: {
avatar?: string;
header?: string;
content?: string;
footer?: string;
};
content?: string | VNode;
loading?: boolean;
loadingRender?: undefined | (() => VNode);
messageRender?: (content: string) => string | VNode;
placement?: "start" | "end";
shape?: "round" | "corner";
styles?: {
avatar?: CSSProperties;
content?: CSSProperties;
footer?: CSSProperties;
header?: CSSProperties;
};
typing?: boolean | TypingOption;
variant?: "borderless" | "filled" | "outlined" | "shadow";
transparent?: boolean;
}
export interface BubbleEmits {
(e: "onTypingComplete"): void;
(e: "onUpdate"): void;
}