/** * Fixtures reproducing the "component whose props is a union type" shape. * * When a component's props parameter is a union of interfaces (`A | B`) that * share enum props, the shared enum literals sit one level deeper than usual * (`function → props-union → interface → prop-union → literal`). This is the * exact shape of GSK's `Button` (`ButtonVariantProps | LinkVariantProps`) and * previously caused `size`/`color` to infer as a plain `string` instead of an * enum, because the literals were nested past `maxDepth`. */ interface UnionButtonCommonProps { /** The size variant */ size?: 'sm' | 'md' | 'lg' | 'xl'; /** The color variant */ color?: 'primary' | 'secondary' | 'tertiary'; isDisabled?: boolean; } interface UnionButtonVariantProps extends UnionButtonCommonProps { type?: 'button' | 'submit' | 'reset'; } interface UnionLinkVariantProps extends UnionButtonCommonProps { href?: string; } export type UnionButtonProps = UnionButtonVariantProps | UnionLinkVariantProps; /** * A button-like component whose props is a union type. */ export declare function UnionPropsButton(props: UnionButtonProps): UnionButtonProps; export {}; //# sourceMappingURL=union-props.d.ts.map