import { ComponentPropsWithoutRef, ComponentPropsWithRef, ElementType } from 'react'; type AsProp = { as?: C; }; /** * Allows for extending a set of props (`ExtendedProps`) by an overriding set of props * (`OverrideProps`), ensuring that any duplicates are overridden by the overriding * set of props. */ type ExtendableProps, OverrideProps = Record> = OverrideProps & Omit; /** * Allows for inheriting the props from the specified element type so that * props like children, className & style work, as well as element-specific * attributes like aria roles. The component (`C`) must be passed in. */ type InheritableElementProps> = ExtendableProps, Props>; export type PolymorphicComponentProps> = InheritableElementProps>; export type PolymorphicComponentPropsWithRef> = PolymorphicComponentProps & { ref?: ComponentPropsWithRef['ref']; }; export type PolymorphicRef = PolymorphicComponentPropsWithRef['ref']; export {}; //# sourceMappingURL=PolymorphicGenerics.d.ts.map