Files
leaudit-platform-frontend/app/styles/components/badge.css
T

100 lines
1.8 KiB
CSS

/**
* 标签组件样式
*/
@layer components {
/* 基础标签 */
.badge {
@apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}
/* 标签尺寸 */
.badge-sm {
@apply px-2 py-0.5 text-xs;
}
.badge-md {
@apply px-2.5 py-1 text-sm;
}
.badge-lg {
@apply px-3 py-1 text-sm;
}
/* 标签颜色 */
.badge-primary {
@apply bg-[rgba(0,104,74,0.1)] text-[#00684a];
}
.badge-secondary {
@apply bg-gray-100 text-gray-800;
}
.badge-success {
@apply bg-[rgba(82,196,26,0.1)] text-[#52c41a];
}
.badge-warning {
@apply bg-[rgba(250,173,20,0.1)] text-[#faad14];
}
.badge-danger {
@apply bg-[rgba(245,34,45,0.1)] text-[#f5222d];
}
.badge-info {
@apply bg-[rgba(24,144,255,0.1)] text-[#1890ff];
}
/* 标签边框样式 */
.badge-outlined {
@apply bg-transparent border;
}
.badge-outlined.badge-primary {
@apply border-[#00684a] text-[#00684a];
}
.badge-outlined.badge-secondary {
@apply border-gray-300 text-gray-700;
}
.badge-outlined.badge-success {
@apply border-[#52c41a] text-[#52c41a];
}
.badge-outlined.badge-warning {
@apply border-[#faad14] text-[#faad14];
}
.badge-outlined.badge-danger {
@apply border-[#f5222d] text-[#f5222d];
}
.badge-outlined.badge-info {
@apply border-[#1890ff] text-[#1890ff];
}
/* 标签带图标 */
.badge-with-icon {
@apply pl-1.5;
}
.badge-with-icon i,
.badge-with-icon svg {
@apply mr-1;
}
/* 计数标签 */
.badge-count {
@apply absolute -top-1 -right-1 flex items-center justify-center h-4 w-4 rounded-full text-[10px] font-bold text-white;
}
.badge-count.badge-primary {
@apply bg-[#00684a] text-white;
}
.badge-count.badge-danger {
@apply bg-[#f5222d] text-white;
}
}