UNPKG

@ant-design/x

Version:

Craft AI-driven interfaces effortlessly

19 lines 938 B
import { mergeToken } from '@ant-design/cssinjs-utils'; import { genStyleHooks } from "../../theme/genStyleUtils"; import genBubbleStyle from "./bubble"; import { genShapeStyle, genVariantStyle } from "./content"; import { genDividerBubbleStyle } from "./divider"; import genBubbleListStyle from "./list"; import { genSlotStyle } from "./slot"; import { genSystemBubbleStyle } from "./system"; export const prepareComponentToken = () => ({ typingContent: '"|"', typingAnimationName: 'cursorBlink', typingAnimationDuration: '0.8s' }); export default genStyleHooks('Bubble', token => { const bubbleToken = mergeToken(token, {}); return [ // 位置越靠后,样式优先级越高 genBubbleStyle(bubbleToken), genVariantStyle(bubbleToken), genShapeStyle(bubbleToken), genSlotStyle(bubbleToken), genBubbleListStyle(bubbleToken), genSystemBubbleStyle(bubbleToken), genDividerBubbleStyle(bubbleToken)]; }, prepareComponentToken);