feat(design): add IMS Admin primitives (Button, StatusTag, Checkbox, FilterChip, Segmented, Avatar, Drawer) and restyle Field, Card, Modal
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
export function initials(name: string): string {
|
||||
return name
|
||||
.split(' ')
|
||||
.map(w => w[0] ?? '')
|
||||
.join('')
|
||||
.toUpperCase()
|
||||
.slice(0, 2)
|
||||
}
|
||||
|
||||
export function Avatar({ name }: { name: string }) {
|
||||
return (
|
||||
<span className="inline-grid place-items-center w-6 h-6 rounded-[6px] bg-accent-200 text-accent-700 text-[11px] font-[650]">
|
||||
{initials(name)}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user