rdesign/frontend/node_modules/@copilotkit/a2ui-renderer/dist/react-renderer/theme/utils.d.mts

26 lines
1.2 KiB
TypeScript

//#region src/react-renderer/theme/utils.d.ts
/**
* Converts a theme class map (Record<string, boolean>) to a className string.
*
* @param classMap - An object where keys are class names and values are booleans
* @returns A space-separated string of class names where the value is true
*
* @example
* classMapToString({ 'a2ui-button': true, 'a2ui-button--primary': true, 'disabled': false })
* // Returns: 'a2ui-button a2ui-button--primary'
*/
declare function classMapToString(classMap: Record<string, boolean> | undefined): string;
/**
* Converts an additional styles object (Record<string, string>) to a React style object.
*
* @param styles - An object with CSS property names as keys and values as strings
* @returns A React-compatible style object, or undefined if no styles
*
* @example
* stylesToObject({ 'background-color': 'red', 'font-size': '16px', '--custom-var': 'blue' })
* // Returns: { backgroundColor: 'red', fontSize: '16px', '--custom-var': 'blue' }
*/
declare function stylesToObject(styles: Record<string, string> | undefined): React.CSSProperties | undefined;
//#endregion
export { classMapToString, stylesToObject };
//# sourceMappingURL=utils.d.mts.map