Skip to content

Conversation

@enguerranws
Copy link
Collaborator

I came across an issue: I did want to use this component as a submit button form a form element, but its typing doesn't allow the usage as a without a onClick prop.

I'm not sure passing onClick as optional is the best option, but even as a <button type="button">, I'm not sure we should constrain the user to pass a onClick prop.

Alternatively, we could pass onClick as optional if the button type attribute is submit or reset.

@garronej
Copy link
Collaborator

garronej commented Feb 2, 2023

Agreed 100%
I think making onClick optional as you did is the best call.
Let's not be too restrictive.

@garronej garronej merged commit 0cb365e into main Feb 2, 2023
@garronej
Copy link
Collaborator

garronej commented Feb 2, 2023

@enguerranws I promise I'll be more reactive next time.

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