https://dev.kronoz.win/r/marzneshin.git
1import type { FC } from "react";
2import { Badge, BadgeVariantKeys } from "@marzneshin/common/components";
3
4interface BooleanPillProps {
5 active: boolean;
6 activeLabel: string;
7 activeVariant?: BadgeVariantKeys;
8 inactiveLabel: string;
9 inactiveVariant?: BadgeVariantKeys;
10}
11
12export const BooleanPill: FC<BooleanPillProps> = ({
13 active,
14 activeLabel,
15 inactiveLabel,
16 activeVariant = "positive",
17 inactiveVariant = "destructive"
18}) => {
19 return (
20 <Badge variant={active ? activeVariant : inactiveVariant}>
21 {active ? activeLabel : inactiveLabel}
22 </Badge>
23 )
24}