diff --git a/src/types/PolymorphicComponentProps/PolymorphicComponentProps.ts b/src/types/PolymorphicComponentProps/PolymorphicComponentProps.ts index a59ebfa..f4126b0 100644 --- a/src/types/PolymorphicComponentProps/PolymorphicComponentProps.ts +++ b/src/types/PolymorphicComponentProps/PolymorphicComponentProps.ts @@ -6,26 +6,26 @@ import type { } from 'react'; /** - * AsProp is a type based on the supplied as prop. + * PropsFromAs is a type based on the supplied as prop. */ -type AsProp = { as?: Types }; +type PropsFromAs = { as?: Type }; /** * MergeAndOverride is a type that omits type keys from BaseTypes that are also present in OverrideProps. */ -type MergeAndOverride = Omit & +type MergeAndOverride = Omit & OverrideProps; -export type PolymorphicRef = ComponentPropsWithRef['ref']; +export type PolymorphicRef = ComponentPropsWithRef['ref']; export type PolymorphicComponentProps< - BaseTypes extends ElementType, + BaseType extends ElementType, OwnProps = Record, > = PropsWithChildren< - MergeAndOverride, AsProp & OwnProps> + MergeAndOverride, PropsFromAs & OwnProps> >; export type PolymorphicComponentPropsWithRef< - BaseTypes extends ElementType, + BaseType extends ElementType, OwnProps = Record, -> = PolymorphicComponentProps & { ref?: PolymorphicRef }; +> = PolymorphicComponentProps & { ref?: PolymorphicRef };