feat: start of avatars

This commit is contained in:
TrèsAbhi committed 2026-01-12 14:13:21 -06:00
1 parent 455679a981
commit ea412086d4
7 files changed
+72 -15

No files matched your search

@@ -0,0 +1,19 @@
.avatar-card {
display: flex;
flex-direction: column;
align-items: center;
.avatar-image {
width: 100%;
aspect-ratio: 7 / 8;
background-size: cover;
background-position: center;
}
.avatar-label {
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
}
@@ -0,0 +1,19 @@
import type { Avatar } from "../../protos/avatar";
import { Text } from "../Text";
import "./index.css";
interface Props {
avatar: Avatar;
}
export function AvatarCard({ avatar }: Props) {
return (
<div className="avatar-card">
<div
className="avatar-image"
style={{ backgroundImage: `url(/api/avatars/${avatar.name}.webp)` }}
/>
<Text className="avatar-label">{avatar.name}</Text>
</div>
);
}