lightbox.js-react
Version:
React lightbox with animation and customization options
15 lines (12 loc) • 435 B
text/typescript
import { ElementType, ComponentPropsWithoutRef } from 'react';
type As<Props = any> = ElementType<Props>;
/**
* Extract the props of a React element or component
*/
type PropsOf<T extends As> = ComponentPropsWithoutRef<T> & {
as?: As;
};
type HTMLProps<T extends As = "div", OmitKeys extends keyof any = never> = Omit<PropsOf<T>, "ref" | "color" | "slot" | OmitKeys> & {
as?: As;
};
export type { As, HTMLProps, PropsOf };