/** * Joins the class names an element resolved to, dropping the ones that are not there. * * Deliberately not a dependency: this package has exactly one runtime dependency (the design tokens) * and adding a second for six lines would be a poor trade for every browser program that bundles it. */ export function classNames(...values: readonly (string | undefined | false)[]): string { return values .filter((value): value is string => typeof value === "string" && value !== "") .join(" "); }