mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
fixed UserRound sizing
This commit is contained in:
@@ -129,6 +129,7 @@
|
|||||||
font-optical-sizing: auto;
|
font-optical-sizing: auto;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
font-variant-ligatures: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.font-300 {
|
.font-300 {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { UserRound } from "lucide-react";
|
import { UserRound } from "lucide-react";
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
const FALLBACK_COLOURS = [
|
const FALLBACK_COLOURS = [
|
||||||
"bg-red-500",
|
"bg-red-500",
|
||||||
@@ -58,7 +59,15 @@ export default function Avatar({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`flex items-center justify-center rounded-full text-white font-medium select-none ${name && "border"} ${!avatarURL && backgroundClass} w-${size || 6} h-${size || 6}`}
|
className={cn(
|
||||||
|
"flex items-center justify-center rounded-full",
|
||||||
|
"text-white font-medium select-none",
|
||||||
|
name && "border",
|
||||||
|
!avatarURL && backgroundClass,
|
||||||
|
"transition-colors",
|
||||||
|
`w-${size || 6}`,
|
||||||
|
`h-${size || 6}`,
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{avatarURL ? (
|
{avatarURL ? (
|
||||||
<img
|
<img
|
||||||
@@ -69,7 +78,7 @@ export default function Avatar({
|
|||||||
) : name ? (
|
) : name ? (
|
||||||
<span className={textClass}>{getInitials(name)}</span>
|
<span className={textClass}>{getInitials(name)}</span>
|
||||||
) : (
|
) : (
|
||||||
<UserRound size={size ? size * 2 + 2 : 14} />
|
<UserRound className={"size-10"} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user