lucid-ui
Version:
A UI component library from AppNexus.
31 lines • 1.23 kB
TypeScript
/**
* bindClassNames
*
* Returns a version of the `classnames` functions where `&` is bound to a given
* value. The returned functions can be further bound to more specific values for
* `&` which allows your bound classnames to look closer to style selector.
*
* Examples:
* bindClassNames('lucid')('&-Button') === 'lucid-Button'
* bindClassNames('lucid').bind('&-Button')('&-active') === 'lucid-Button-active'
*/
export declare function bindClassNames(value?: string, variable?: RegExp | string): ((...args: any[]) => string) & {
bind(nextValue?: string, ...args: any[]): ((...args: any[]) => string) & any;
};
export declare const NAMESPACE: string;
/**
* Exports a lucid-bound version of classnames, which can be make more specific
* to a component.
*
* Example:
* const cx = lucidClassNames.bind('&-Button')
*
* cx('&',{
* '&-active': true
* }, ['custom-classname']) === 'lucid-Button lucid-Button-active custom-classname'
*/
export declare const lucidClassNames: ((...args: any[]) => string) & {
bind(nextValue?: string, ...args: any[]): ((...args: any[]) => string) & any;
};
export declare function uniqueName(prefix: string): string;
//# sourceMappingURL=style-helpers.d.ts.map