feat: add Badge and Alert components
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
Avatar,
|
||||
AvatarImage,
|
||||
AvatarFallback,
|
||||
Badge,
|
||||
BadgeAnchor,
|
||||
} from "@heroui-vue/components";
|
||||
|
||||
const AVATAR_URL =
|
||||
"https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg";
|
||||
|
||||
const colors = ["accent", "success", "warning", "danger"] as const;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex items-center gap-6">
|
||||
<BadgeAnchor v-for="color in colors" :key="color">
|
||||
<Avatar>
|
||||
<AvatarImage alt="头像" :src="AVATAR_URL" />
|
||||
<AvatarFallback>JD</AvatarFallback>
|
||||
</Avatar>
|
||||
<Badge :color="color" placement="bottom-right" size="sm" />
|
||||
</BadgeAnchor>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user