Files
defgov/packages/ui/src/component/avatar/Avatar.tsx
2026-04-23 18:17:17 +08:00

21 lines
383 B
TypeScript

import * as BUI from "@base-ui/react";
type AvatarPorps = {
size?: "sm" | "md" | "lg";
src?: string;
alt?: string;
};
export const Avatar = (props: AvatarPorps) => {
const { size = "md", src, alt } = props;
return (
<BUI.Avatar.Root>
<BUI.Avatar.Image src={src} alt={alt} />
<BUI.Avatar.Fallback></BUI.Avatar.Fallback>
</BUI.Avatar.Root>
);
};