UNPKG

@wordpress/components

Version:
14 lines • 637 B
import type * as React from 'react'; type PolymorphicElementProps<T extends React.ElementType> = Omit<React.ComponentPropsWithoutRef<T>, 'as'> & { as?: T; }; type PolymorphicElementRef<T extends React.ElementType> = React.ComponentPropsWithRef<T>['ref']; /** * Internal utility for components that need Emotion-compatible `as` behavior * while rendering with plain React elements. */ export declare const PolymorphicElement: <T extends React.ElementType = 'div'>(props: PolymorphicElementProps<T> & { ref?: PolymorphicElementRef<T>; }) => React.ReactElement | null; export {}; //# sourceMappingURL=polymorphic-element.d.ts.map