UNPKG

@engie-group/fluid-design-system-react

Version:

Fluid Design System React

15 lines (14 loc) 431 B
import React from 'react'; type ConditionalWrapperProps<T extends { wrapperAsChild?: boolean; }> = T['wrapperAsChild'] extends true ? T : T & { interactiveProps?: React.ComponentPropsWithoutRef<'button'>; }; export type WrapperProps = ConditionalWrapperProps<{ wrapperAsChild: true; }> | ConditionalWrapperProps<{ wrapperAsChild: false; }> | ConditionalWrapperProps<{ wrapperAsChild?: undefined; }>; export {};