Redesign the user badges (authed, mods)

This commit is contained in:
Gabe Kangas
2023-01-29 15:39:50 -08:00
parent 9ab729d996
commit 71bb8a7381
7 changed files with 75 additions and 34 deletions

View File

@@ -4,14 +4,15 @@ import styles from './ChatUserBadge.module.scss';
export type ChatUserBadgeProps = {
badge: React.ReactNode;
userColor: number;
title: string;
};
export const ChatUserBadge: FC<ChatUserBadgeProps> = ({ badge, userColor }) => {
const color = `var(--theme-user-colors-${userColor})`;
const style = { color, borderColor: color };
export const ChatUserBadge: FC<ChatUserBadgeProps> = ({ badge, userColor, title }) => {
const color = `var(--theme-color-users-${userColor})`;
const style = { color };
return (
<span style={style} className={styles.badge}>
<span style={style} className={styles.badge} title={title}>
{badge}
</span>
);