@zog-ui/core
Version:
[](https://www.npmjs.com/package/@zog-ui/core)
25 lines (24 loc) • 1.04 kB
TypeScript
import { ComponentPropsWithoutRef, ComponentPropsWithRef, ElementType, PropsWithChildren } from 'react';
/**
* @deprecated Use `asChild` instead
*/
export declare type AsProps<T extends ElementType> = {
as?: T;
};
/**
* @deprecated Use `asChild` instead
*/
export declare type KeyPropsToOmit<T extends ElementType, P> = keyof (AsProps<T> & P);
/**
* @deprecated Use `asChild` instead
*/
export declare type PolymorphicComponentProps<T extends ElementType, Props = unknown> = PropsWithChildren<AsProps<T> & Props> & Omit<ComponentPropsWithoutRef<T>, KeyPropsToOmit<T, Props>>;
/**
* @deprecated Use `asChild` instead
*/
export declare type PolymorphicRef<T extends ElementType> = ComponentPropsWithRef<T>['ref'];
export declare type PolymorphicComponentPropsWithRef<T extends ElementType, Props = unknown> = PolymorphicComponentProps<T, Props> & {
ref?: PolymorphicRef<T>;
};
export declare type MergeProps<T, P> = Omit<T, keyof P> & P;
export declare type RemoveAsProps<Props> = Omit<Props, 'as'>;