2022-09-02 06:41:33 +02:00
|
|
|
import React from 'react';
|
2022-08-21 23:04:16 +02:00
|
|
|
import s from './ChatUserBadge.module.scss';
|
|
|
|
|
|
|
|
interface Props {
|
2022-09-02 06:41:33 +02:00
|
|
|
badge: React.ReactNode;
|
2022-08-21 23:04:16 +02:00
|
|
|
userColor: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default function ChatUserBadge(props: Props) {
|
|
|
|
const { badge, userColor } = props;
|
|
|
|
const color = `var(--theme-user-colors-${userColor})`;
|
|
|
|
const style = { color, borderColor: color };
|
|
|
|
|
|
|
|
return (
|
|
|
|
<span style={style} className={s.badge}>
|
|
|
|
{badge}
|
|
|
|
</span>
|
|
|
|
);
|
|
|
|
}
|