w-funnel/src/components/ui/Avatar/Avatar.tsx
gofnnp 55b81890a3 trial-payment
new pages
2025-10-01 17:33:49 +04:00

24 lines
576 B
TypeScript

import {
AvatarImage,
Avatar as AvatarComponent,
AvatarFallback,
} from "../avatar";
interface AvatarProps extends React.ComponentProps<typeof AvatarComponent> {
imageProps?: React.ComponentProps<typeof AvatarImage>;
fallbackProps?: React.ComponentProps<typeof AvatarFallback>;
}
export default function Avatar({
imageProps,
fallbackProps,
...props
}: AvatarProps) {
return (
<AvatarComponent {...props}>
{imageProps && <AvatarImage {...imageProps} />}
{fallbackProps && <AvatarFallback {...fallbackProps} />}
</AvatarComponent>
);
}