(
comp: (
props: PropsFromAs<ComponentType, Props>,
ref: React.RefObject<any>,
) => React.ReactElement | null,
)
| 75 | * @param Comp |
| 76 | */ |
| 77 | export function forwardRefWithAs<Props, ComponentType extends As>( |
| 78 | comp: ( |
| 79 | props: PropsFromAs<ComponentType, Props>, |
| 80 | ref: React.RefObject<any>, |
| 81 | ) => React.ReactElement | null, |
| 82 | ) { |
| 83 | return React.forwardRef(comp as any) as unknown as ComponentWithAs<ComponentType, Props> |
| 84 | } |
| 85 | |
| 86 | /* |
| 87 | Test components to make sure our dynamic As prop components work as intended |
no outgoing calls
no test coverage detected
searching dependent graphs…