Update UserIcon.tsx

This commit is contained in:
Ryan Alexander 2021-08-23 22:28:49 +10:00 committed by GitHub
parent af691be15c
commit dfae11c204
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,10 +14,11 @@ import IconBase, { IconBaseProps } from "../IconBase";
import fallback from "../assets/user.png"; import fallback from "../assets/user.png";
import {VolumeMute} from "@styled-icons/boxicons-solid"; import {VolumeMute} from "@styled-icons/boxicons-solid";
type VoiceStatus = "muted" | "deaf";
interface Props extends IconBaseProps<User> { interface Props extends IconBaseProps<User> {
mask?: string; mask?: string;
status?: boolean; status?: boolean;
voice?: string; voice?: VoiceStatus;
showServerIdentity?: boolean; showServerIdentity?: boolean;
} }
@ -33,7 +34,7 @@ export function useStatusColour(user?: User) {
: theme["status-invisible"]; : theme["status-invisible"];
} }
const VoiceIndicator = styled.div<{ status: string }>` const VoiceIndicator = styled.div<{ status: VoiceStatus }>`
width: 10px; width: 10px;
height: 10px; height: 10px;
border-radius: var(--border-radius-half); border-radius: var(--border-radius-half);