UNPKG

1.09 kBTypeScriptView Raw
1/**
2 * Combines classNames.
3 *
4 * @param classes - A list of classNames
5 *
6 * @returns A single string with the combined className
7 */
8export declare function classes(...classes: (string | false | undefined | null | {
9 [className: string]: any;
10})[]): string;
11/**
12 * Combines classNames. Removes all duplicates
13 *
14 * @param classes - A list of classNames
15 *
16 * @returns A single string with the combined className
17 */
18export declare function classesDedupe(...classes: (string | false | undefined | null | {
19 [className: string]: any;
20})[]): string;
21/**
22 * Translates the attributes of a DOM element into attributes that can
23 * be understood by React. Currently not comprehensive, we will add special
24 * cases as they become relevant.
25 *
26 * @param elem - A DOM element
27 *
28 * @param ignore - An optional list of attribute names to ignore
29 *
30 * @returns An object with key:value pairs that are the React-friendly
31 * translation of elem's attributes
32 */
33export declare function getReactAttrs(elem: Element, { ignore }?: {
34 ignore?: string[];
35}): {
36 [key: string]: string | null;
37};