@octopusdeploy/design-system-components
Version:
The design systems component library.
32 lines (31 loc) • 1.13 kB
TypeScript
import type React from "react";
export type BadgeVariant = "neutral" | "info" | "success" | "warning" | "danger" | "inverseNeutral" | "feature" | "upsell";
interface SharedBadgeProps {
variant: BadgeVariant;
}
export interface SmallOrMediumBadgePropsWithIcon extends SharedBadgeProps {
size: "small" | "medium";
count?: number;
icon?: React.ReactNode;
label?: string;
variant: Exclude<BadgeVariant, "upsell">;
statusAnimation?: boolean;
}
export interface SmallOrMediumBadgePropsUpsell extends SharedBadgeProps {
size: "small" | "medium";
count?: number;
label?: string;
variant: "upsell";
hideIcon?: boolean;
statusAnimation?: boolean;
}
export type SmallOrMediumBadgeProps = SmallOrMediumBadgePropsWithIcon | SmallOrMediumBadgePropsUpsell;
export interface ExtraSmallBadgeProps extends SharedBadgeProps {
size: "xSmall";
count?: number;
label?: string;
statusAnimation?: boolean;
}
export type BadgeProps = SmallOrMediumBadgeProps | ExtraSmallBadgeProps;
export declare function Badge(props: BadgeProps): import("react/jsx-runtime").JSX.Element;
export {};