Add user chat message badges. Closes #1988
This commit is contained in:
18
web/components/chat/ChatUserMessage/ChatUserBadge.tsx
Normal file
18
web/components/chat/ChatUserMessage/ChatUserBadge.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import s from './ChatUserBadge.module.scss';
|
||||
|
||||
interface Props {
|
||||
badge: string;
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user