@cmk/fe_utils
Version:
frontend utility library
28 lines (26 loc) • 1.09 kB
TypeScript
import { EditorStateType, Element } from '../../types';
import { Dispatch, SetStateAction } from 'react';
import { ElementModel } from '../../editorComponents';
/** extracts a component's icon keys (properties of type 'icon') */
export declare const getIconKeys: (elementType: string, elementModels: ElementModel[]) => {
directIconKeys: never[];
arrayOfObjectProperties: never[];
arrayOfObjectIconKeys?: undefined;
} | {
directIconKeys: string[];
arrayOfObjectProperties: {
key: string;
properties: Record<string, import('../..').SchemaType<false> & {
category?: import('../../editorComponents/componentDefType').ElementCategory;
}>;
propertyKeys: string[];
}[];
arrayOfObjectIconKeys: string[];
};
type Icons = {
[key: string]: string;
};
export declare const useMdiIcons: (selectedPageElements: Element[], components: ElementModel[], properties: EditorStateType["properties"], importIconByName: (name: string) => Promise<string>) => [{
[key: string]: string;
}, Dispatch<SetStateAction<Icons>>];
export {};