mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-20 06:34:55 +00:00
20 lines
471 B
TypeScript
20 lines
471 B
TypeScript
import Message from './Message';
|
|
import styles from './style.less';
|
|
|
|
type Props = {
|
|
position: 'left' | 'right';
|
|
data: any;
|
|
quote?: string;
|
|
};
|
|
|
|
const Text: React.FC<Props> = ({ position, data, quote }) => {
|
|
return (
|
|
<Message position={position} bubbleClassName={styles.textBubble}>
|
|
{position === 'right' && quote && <div className={styles.quote}>{quote}</div>}
|
|
<div className={styles.text}>{data}</div>
|
|
</Message>
|
|
);
|
|
};
|
|
|
|
export default Text;
|