Use avatar on login page (#1336)

This commit is contained in:
Luke Vella 2024-09-08 22:01:52 +01:00 committed by GitHub
parent 33385f9039
commit e4b1fee46c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 68 additions and 38 deletions

View file

@ -7,14 +7,17 @@ import { cn } from "@rallly/ui";
const Avatar = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
>(({ className, ...props }, ref) => (
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> & {
size?: number;
}
>(({ className, size = 48, ...props }, ref) => (
<AvatarPrimitive.Root
ref={ref}
className={cn(
"relative flex size-10 shrink-0 overflow-hidden rounded-full",
"relative flex shrink-0 overflow-hidden rounded-full",
className,
)}
style={{ width: size, height: size }}
{...props}
/>
));