mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: start of avatars
This commit is contained in:
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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user