UNPKG

shelving

Version:

Toolkit for using data in JavaScript.

20 lines (19 loc) 897 B
import type { ReactElement } from "react"; import type { Color } from "../style/Color.js"; /** Props for `DocumentationKind`. */ export interface DocumentationKindProps { /** The documentation kind (e.g. `"function"`, `"class"`, `"interface"`, `"type"`, `"constant"`, `"method"`, `"property"`). */ readonly kind: string; } /** * Get the raw colour variant for a documented symbol's `kind`, or `undefined` for an unknown kind. * - Shared source of truth so the kind tag and its surrounding card pick the same hue. */ export declare function getDocumentationKindColor(kind: string): Color | undefined; /** * Colour-coded tag for a documented symbol's kind. * - Thin wrapper over `<Tag>` that maps the kind string to a raw colour variant. * * @example <DocumentationKind kind="function" /> */ export declare function DocumentationKind({ kind }: DocumentationKindProps): ReactElement;