7 changed files with 75 additions and 34 deletions
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
import dynamic from 'next/dynamic'; |
||||
import React, { FC } from 'react'; |
||||
import { ChatUserBadge } from './ChatUserBadge'; |
||||
|
||||
// Lazy loaded components
|
||||
|
||||
const SafetyCertificateFilled = dynamic(() => import('@ant-design/icons/SafetyCertificateFilled'), { |
||||
ssr: false, |
||||
}); |
||||
|
||||
export type AuthedUserBadgeProps = { |
||||
userColor: number; |
||||
}; |
||||
|
||||
export const AuthedUserBadge: FC<AuthedUserBadgeProps> = ({ userColor }) => ( |
||||
<ChatUserBadge badge={<SafetyCertificateFilled />} userColor={userColor} title="Moderator" /> |
||||
); |
||||
@ -1,13 +1,15 @@
@@ -1,13 +1,15 @@
|
||||
.badge { |
||||
font-family: var(--theme-text-display-font-family); |
||||
font-weight: 500; |
||||
font-size: 0.5rem; |
||||
text-transform: uppercase; |
||||
color: white; |
||||
background-color: var(--color-owncast-palette-0); |
||||
height: 18px; |
||||
width: 18px; |
||||
border-radius: 2px; |
||||
text-align: center; |
||||
padding: 2px; |
||||
padding-top: 0px; |
||||
padding-bottom: 0px; |
||||
border-radius: 3px; |
||||
border-width: 1px; |
||||
border-style: solid; |
||||
margin-left: 3px; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
overflow: hidden; |
||||
margin-left: 5px; |
||||
font-size: 0.75rem; |
||||
} |
||||
|
||||
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
import dynamic from 'next/dynamic'; |
||||
import React, { FC } from 'react'; |
||||
import { ChatUserBadge } from './ChatUserBadge'; |
||||
|
||||
// Lazy loaded components
|
||||
|
||||
const StarFilled = dynamic(() => import('@ant-design/icons/StarFilled'), { |
||||
ssr: false, |
||||
}); |
||||
|
||||
export type ModerationBadgeProps = { |
||||
userColor: number; |
||||
}; |
||||
|
||||
export const ModerationBadge: FC<ModerationBadgeProps> = ({ userColor }) => ( |
||||
<ChatUserBadge badge={<StarFilled />} userColor={userColor} title="Moderator" /> |
||||
); |
||||
Loading…
Reference in new issue