UNPKG

@equinor/eds-utils

Version:

Utility functions and hooks for the Equinor Design System

8 lines (7 loc) 366 B
import { RefAttributes, FC, ElementType, ComponentPropsWithRef } from 'react'; export type OverridableComponent<Component, Element extends HTMLElement> = { (props: Component & RefAttributes<Element>): ReturnType<FC>; <As extends ElementType>(props: { as?: As; } & Component & Omit<ComponentPropsWithRef<As>, keyof Component>): ReturnType<FC>; };