react-classnaming
Version:
Tools to establish CSS classes as an explicit abstraction layer and to handle it as an interface between React and CSSStyleDeclaration
8 lines (7 loc) • 624 B
TypeScript
import type { ClassNamed, ClassHash } from "./main.types";
import type { Falsy } from "./ts-swiss.types";
export { wrapper, resolver, picker, joinWithLead };
declare function wrapper<T extends Record<string, any>>(destination: T, className: undefined | string): T & ClassNamed;
declare function picker(vocabulary: undefined | Record<string, ClassHash>, keys: string[]): string[];
declare function resolver(vocabulary: undefined | Record<string, ClassHash>, actions: Record<string, ClassHash | boolean>): string[];
declare function joinWithLead(value: Falsy | ClassHash, arr: undefined | string | readonly string[]): string;