@meonode/ui
Version:
A structured approach to component composition with built-in theming, prop separation, and dynamic children handling.
29 lines • 1.2 kB
TypeScript
import { type CSSProperties } from 'react';
/**
* Retrieves the concatenated CSS string for server-side rendering.
* @returns {string} The CSS string.
*/
export declare function getServerStyles(): string;
type CSSValue = string | number;
interface NestedStyle extends CSSProperties {
[key: string]: CSSValue | NestedStyle | undefined;
}
interface StyleObject extends NestedStyle {
[key: string]: CSSValue | StyleObject | undefined;
}
/**
* Custom React hook to generate and manage CSS classes from a style object.
* Supports nesting, pseudo-selectors, and at-rules (@media, @container, @supports).
* Handles both client-side and server-side rendering.
* @param {StyleObject} sxObject The style object defining the CSS.
* @param {any[]} deps Dependencies for memoization, similar to `useEffect` or `useMemo`.
* @returns {string} The generated CSS class name.
*/
export declare function useClasses(sxObject: StyleObject, deps?: any[]): string;
/**
* Clears all generated styles and resets the internal state.
* Useful for development or testing environments to ensure a clean slate.
*/
export declare function purgeStyles(): void;
export {};
//# sourceMappingURL=useClasses.d.ts.map