import Image from "next/image"; import React, { ComponentProps, PropsWithChildren } from "react"; import classNames from "classnames"; export interface AvatarSizes { xs: string; sm: string; md: string; lg: string; xl: string; [key: string]: string; } interface IUserImageProps { src: string; status?: "online" | "offline" | "donotdisturb" | "gone"; size?: keyof AvatarSizes; } const sizes: AvatarSizes = { xs: "w-4 h-4", sm: "w-8 h-8", md: "w-10 h-10", lg: "w-12 h-14", xl: "w-14 h-14", }; const UserImage: React.FC = ({ src, status = "gone", size = "md", }) => { const imgClassName = classNames(sizes[size]); return (
Profile Image
); }; export default UserImage;