ChatUserBadge.tsx 453 B

123456789101112131415161718
  1. import React, { FC } from 'react';
  2. import styles from './ChatUserBadge.module.scss';
  3. export type ChatUserBadgeProps = {
  4. badge: React.ReactNode;
  5. userColor: number;
  6. };
  7. export const ChatUserBadge: FC<ChatUserBadgeProps> = ({ badge, userColor }) => {
  8. const color = `var(--theme-user-colors-${userColor})`;
  9. const style = { color, borderColor: color };
  10. return (
  11. <span style={style} className={styles.badge}>
  12. {badge}
  13. </span>
  14. );
  15. };