feat(chore): add avatar utility class

This commit is contained in:
Julien Oculi 2024-06-18 14:04:38 +02:00
parent 3e3fd59fe7
commit 873f4d23dc

View file

@ -0,0 +1,8 @@
import type { UrlString } from '@/types.ts'
export class Avatar {
static fromEmoji(emoji: string): UrlString {
return `data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%2210 0 100 100%22><text y=%22.90em%22 font-size=%2290%22>${emoji}</text></svg>`
}
private constructor() {}
}