UNPKG

ab-test-jsx

Version:
11 lines (10 loc) 480 B
import * as React from 'react'; import { Variant, ABTests } from '../ABTestsContext'; interface OwnProps<T> { variant: Variant; name: Extract<keyof T, string | number>; } declare type Props<T> = React.PropsWithChildren<OwnProps<T>>; export declare type ABTestComponent<T extends ABTests> = React.FC<Props<T>>; declare const ABTest: React.MemoExoticComponent<(<T extends ABTests>(props: React.PropsWithChildren<OwnProps<T>>) => JSX.Element | null)>; export default ABTest;