UNPKG

923 BTypeScriptView Raw
1import { IBadge } from "../Badge";
2import * as React from "react";
3import { BoxProps } from "../Box";
4import { PseudoBoxProps } from "../PseudoBox";
5import { IconProps } from "../Icon";
6import { Omit } from "../common-types";
7
8export interface ITag {
9 /**
10 * The variant of the tag.
11 */
12 variant?: IBadge["variant"];
13 /**
14 * The size of the tag.
15 */
16 size?: "sm" | "md" | "lg";
17 /**
18 * The color scheme of the tag.
19 */
20 variantColor?: IBadge["variantColor"];
21}
22export interface ITagCloseButton {
23 isDisabled?: boolean;
24}
25export type TagProps = ITag & Omit<PseudoBoxProps, "size">;
26declare const Tag: React.FC<TagProps>;
27export default Tag;
28
29export const TagLabel: React.FC<BoxProps>;
30export const TagCloseButton: React.FC<PseudoBoxProps> & ITagCloseButton;
31
32type TagIconProps = Omit<IconProps, "name"> & {
33 icon: IconProps["name"] | React.ComponentType;
34};
35export const TagIcon: React.FC<TagIconProps>;