/*! Strand UI | MIT License | dillingerstaffing.com */ import type { ComponentChildren, JSX } from "preact"; import { forwardRef } from "preact/compat"; import { cx } from "../../internal/index.js"; export interface TagProps extends Omit, "children"> { variant?: "solid" | "outlined"; status?: "default" | "teal" | "blue" | "amber" | "red"; /** Show the remove control. */ removable?: boolean; /** Called when the remove control is pressed. */ onRemove?: () => void; /** Accessible name of the remove control. */ removeLabel?: string; children?: ComponentChildren; } /** * Compact label for categorisation or status. * * @example * Active */ export const Tag = forwardRef( ({ variant = "solid", status = "default", removable = false, onRemove, removeLabel = "Remove", className = "", children, ...rest }, ref) => ( {children} {removable && ( )} ), ); Tag.displayName = "Tag";