UNPKG

799 BTypeScriptView Raw
1import { ITheme } from '../interfaces/index';
2export declare type GlobalClassNames<IStyles> = Record<keyof IStyles, string>;
3/**
4 * Checks for the `disableGlobalClassNames` property on the `theme` to determine if it should return `classNames`
5 * Note that calls to this function are memoized.
6 *
7 * @param classNames - The collection of global class names that apply when the flag is false. Make sure to pass in
8 * the same instance on each call to benefit from memoization.
9 * @param theme - The theme to check the flag on
10 * @param disableGlobalClassNames - Optional. Explicitly opt in/out of disabling global classnames. Defaults to false.
11 */
12export declare function getGlobalClassNames<T>(classNames: GlobalClassNames<T>, theme: ITheme, disableGlobalClassNames?: boolean): GlobalClassNames<T>;