mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-29 16:14:55 +00:00
25 lines
578 B
TypeScript
25 lines
578 B
TypeScript
import { Badge, Flex, Text } from '@/components/atoms'
|
|
|
|
interface LabelWithBadgeProps {
|
|
label: string
|
|
badge?: number | string
|
|
badgeVariant?: 'default' | 'secondary' | 'destructive' | 'outline'
|
|
}
|
|
|
|
export function LabelWithBadge({
|
|
label,
|
|
badge,
|
|
badgeVariant = 'secondary'
|
|
}: LabelWithBadgeProps) {
|
|
return (
|
|
<Flex align="center" gap="sm">
|
|
<Text variant="small" className="font-medium">{label}</Text>
|
|
{badge !== undefined && (
|
|
<Badge variant={badgeVariant} className="text-xs">
|
|
{badge}
|
|
</Badge>
|
|
)}
|
|
</Flex>
|
|
)
|
|
}
|