UNPKG

@activecollab/components

Version:

ActiveCollab Components

52 lines 2.29 kB
import { ReactElement } from "react"; /** * FeatureAvailability — a compact, data-driven block that states where a * feature is available: on which hosting, on which plans and to which roles. * * It is the reusable version of the availability panel used in the Help Docs * example articles, extracted so several stories (and, later, the real * PortableText renderer) can share one implementation and one visual language: * * • green check → available * • analog clock → decided but not shipped yet ("to be determined") * • strikethrough → not included * * The component is theme-agnostic (all colors come from `--color-*` tokens) and * self-contained (it carries its own typography, so it renders correctly * outside the article body as well). */ export type AvailabilityStatus = "available" | "pending" | "excluded"; export interface AvailabilityMark { label: string; status: AvailabilityStatus; /** Muted parenthetical, e.g. "(stable, since Jun 17 2026)". Include the parens. */ note?: string; /** Italic muted trailing text for the pending state, e.g. "to be determined". */ pending?: string; /** * Nested marks rendered in parentheses, e.g. Member+ (PM ✓ / FM ✓). When a * mark has children it does not render its own status icon — the children * carry the marks. */ children?: AvailabilityMark[]; } export interface AvailabilityRow { label: string; items: AvailabilityMark[]; /** Icon before the label (Availability row) or after it (Plans / Roles). Default "after". */ iconPosition?: "before" | "after"; /** Separate items with a middot (used on the Availability row). Default false. */ separated?: boolean; } export interface FeatureAvailabilityProps { rows: AvailabilityRow[]; className?: string; } export declare const FeatureAvailability: ({ rows, className, }: FeatureAvailabilityProps) => ReactElement; /** * A realistic GA feature: shipped on Cloud, self-hosted still to be scheduled, * on every plan, for internal roles but not for clients. Exercises all three * marks (check / clock / strikethrough) out of the box. */ export declare const DEFAULT_FEATURE_AVAILABILITY: FeatureAvailabilityProps; //# sourceMappingURL=FeatureAvailability.d.ts.map