Message.tsx 504 B

123456789101112131415161718
  1. import { View, Text } from "@tarojs/components";
  2. import ThinkAnimation from '../think-animation/index'
  3. import style from './index.module.less'
  4. interface Props {
  5. text: string
  6. }
  7. export default ({text}:Props) => {
  8. return <View className="flex justify-end">
  9. <View className={`${style.message } ${style.messageMe}`}>
  10. <View className={`${style.messageContent}`}>
  11. {text.length === 0 && <ThinkAnimation></ThinkAnimation>}
  12. <Text>{text}</Text>
  13. </View>
  14. </View>
  15. </View>
  16. }