@plteam/chat-ui
Version:
CUI Kit is a free and open-source library for creating AI assistant chat interfaces, built with React, Material UI, and TypeScript
21 lines (20 loc) • 745 B
TypeScript
import * as React from 'react';
import { SlotValue } from '../views/core/usePropsSlots';
import { SlotPropsType } from '../views/core/SlotPropsType';
type ExtractMarkdownKeys<T> = {
[K in keyof T as K extends `markdown${string}` ? K : never]: T[K];
};
type MarkdownSlotsPropsType = ExtractMarkdownKeys<SlotPropsType<any, any>>;
type SlotsType = {
[key in keyof MarkdownSlotsPropsType]: SlotValue<MarkdownSlotsPropsType[key]>;
};
type Props = React.PropsWithChildren<{
text: string;
inProgress: boolean;
loading?: boolean;
slots?: Partial<SlotsType>;
slotProps?: Partial<MarkdownSlotsPropsType>;
className?: string;
}>;
declare const ChatMarkdown: React.FC<Props>;
export default ChatMarkdown;