@navinc/base-react-components
Version:
Nav's Pattern Library
20 lines (19 loc) • 1.41 kB
TypeScript
import React, { DetailedHTMLProps, ElementType } from 'react';
import { Icon } from '../icon/icon.js';
import { InferComponentProps } from '../../types.js';
import { IconName } from '../../icons/index.js';
import { VariantProps } from 'class-variance-authority';
declare const badgeVariants: (props?: ({
variant?: "success" | "error" | "warn" | "super" | "info" | "primary" | "primaryContainer" | "prime" | "gray" | "light" | "default" | "disabled" | "secondary" | "standard" | "plain" | "lightGray" | "lightStroke" | "inverse" | "plainPrimary" | null | undefined;
letterOnly?: boolean | null | undefined;
density?: "loose" | "tight" | null | undefined;
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
type BadgeProps = VariantProps<typeof badgeVariants> & {
component?: ElementType;
} & DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
export declare const Badge: React.ForwardRefExoticComponent<Omit<BadgeProps, "ref"> & React.RefAttributes<HTMLElement>>;
export declare const BadgeIcon: (props: InferComponentProps<typeof Icon>) => import("react/jsx-runtime").JSX.Element;
export declare const BadgeWithIcon: React.ForwardRefExoticComponent<InferComponentProps<React.ForwardRefExoticComponent<Omit<BadgeProps, "ref"> & React.RefAttributes<HTMLElement>>> & {
leadIcon?: IconName | string;
} & React.RefAttributes<HTMLElement>>;
export {};