gitscope
← marzneshin / v0.3.1 / dashboard/src/components/boolean-pill/index.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/components/boolean-pill/index.tsx · TypeScript
Blame Raw
 1import type { FC } from "react";
 2import { Badge } from "@marzneshin/components";
 3
 4interface BooleanPillProps {
 5    active: boolean;
 6    activeLabel: string;
 7    inactiveLabel: string;
 8}
 9
10export const BooleanPill: FC<BooleanPillProps> = ({ active, activeLabel, inactiveLabel }) => {
11    return (
12        <Badge variant={active ? "positive" : "destructive"}>
13            {active ? activeLabel : inactiveLabel}
14        </Badge>
15    )
16}