owncast/web/components/chat/ChatUserBadge/ChatUserBadge.tsx

20 lines
427 B
TypeScript
Raw Normal View History

import React from 'react';
import s from './ChatUserBadge.module.scss';
interface Props {
badge: React.ReactNode;
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>
);
}