@wazespace/wme-react-components
Version:
A package with useful replications of the Waze Map Editor components to use in userscripts
9 lines • 614 B
TypeScript
import { ForwardRefExoticComponent, HTMLAttributes, ReactElement } from 'react';
import { DashToPascal } from './case-converters';
type SlotNameToProperty<S extends string> = S extends '' ? never : `slot${DashToPascal<S>}`;
type SlotsPropsFromSlotNames<S extends string> = {
[K in SlotNameToProperty<S>]?: ReactElement;
};
export declare function createReactComponent<S extends string = '', P = Record<string, any>>(elementTag: keyof JSX.IntrinsicElements): ForwardRefExoticComponent<SlotsPropsFromSlotNames<S> & P & HTMLAttributes<HTMLElement>>;
export {};
//# sourceMappingURL=create-react-component.d.ts.map