Skip to content

Conversation

@kyletsang
Copy link
Collaborator

Fixes type inference on custom element props such as event handlers. Previously it was all defaulting to button elements and ignoring as

@kyletsang kyletsang requested a review from jquense August 22, 2025 06:23
@kyletsang kyletsang force-pushed the fix-button-prop-infer branch from d2ded2b to afae825 Compare August 22, 2025 06:30
return <Component {...props} {...buttonProps} ref={ref} />;
},
);
const Button: DynamicRefForwardingComponent<'button', ButtonProps> =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC the reason we didn't do this was to keep the type simple since button is used everywhere and the as types break or are complex in weird ways

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants