UNPKG

@c15t/react

Version:

Developer-first CMP for React: cookie banner, consent manager, preferences centre. GDPR ready with minimal setup and rich customization

9 lines 634 B
import type { ComponentPropsWithoutRef, ElementType, PropsWithChildren } from 'react'; type AsProp<T extends ElementType> = { as?: T; }; type PropsToOmit<T extends ElementType, P> = keyof (AsProp<T> & P); type PolymorphicComponentProp<T extends ElementType, Props extends Record<string, unknown> = Record<string, unknown>> = PropsWithChildren<Props & AsProp<T>> & Omit<ComponentPropsWithoutRef<T>, PropsToOmit<T, Props>>; export type PolymorphicComponentProps<T extends ElementType, P extends Record<string, unknown> = Record<string, unknown>> = PolymorphicComponentProp<T, P>; export {}; //# sourceMappingURL=polymorphic.d.ts.map