Add user chat message badges. Closes #1988

This commit is contained in:
Gabe Kangas
2022-08-21 14:04:16 -07:00
parent eac7e81a9c
commit 3cfcad7a93
6 changed files with 70 additions and 2 deletions

View 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>
);
}