import React from 'react'; import { ViewStyle, TextStyle, StyleProp, DimensionValue } from 'react-native'; import { type TestableProps } from '../../common/test'; import { type SpacingProps } from '../../../theme/spacing'; import { type BoxProps } from '../../common/box'; export type ChatBubbleAlign = 'left' | 'right'; export type ChatAction = React.ReactNode | { label: string; onPress?: () => void; }; export interface ChatBubbleProps extends TestableProps, SpacingProps, BoxProps { text?: string; children?: React.ReactNode; showAvatar?: boolean; avatarUri?: string; avatarNode?: React.ReactNode; align?: ChatBubbleAlign; leftActions?: ChatAction[]; rightFooterText?: string | React.ReactNode; bubbleStyle?: StyleProp; textStyle?: StyleProp; footerTextStyle?: StyleProp; style?: StyleProp; /** * 气泡最大宽度(默认 '80%')。支持数字(px)或百分比字符串。 * 内容超出后将自动换行。 */ maxBubbleWidth?: DimensionValue; /** 头像垂直对齐:top=顶部,bottom=底部(默认) */ avatarVerticalAlign?: 'top' | 'bottom'; /** 气泡圆角半径(默认取主题 theme.borderRadius.lg) */ bubbleRadius?: number; /** 显示头像时,靠近头像的角是否设为直角(默认 false) */ squareCornerNearAvatar?: boolean; /** 独立控制四个角是否直角(在隐藏头像时尤为有用) */ squareCorners?: { topLeft?: boolean; topRight?: boolean; bottomLeft?: boolean; bottomRight?: boolean; }; /** 底部内容位置:inside=在气泡内,outside=在气泡外(默认) */ footerPlacement?: 'inside' | 'outside'; /** 开启后:本条气泡的高度只会增高,不会因内容变化而下降(默认 false) */ growHeightOnly?: boolean; } export declare const ChatBubble: React.FC; export default ChatBubble; //# sourceMappingURL=ChatBubble.d.ts.map