Button: Button with type="submit' expects 'href' or 'onClick' in TS
shaneakins opened this issue · 2 comments
shaneakins commented
Button (*)
Expected Behaviour (*)
Button with type='submit'
should have href
and onClick
as optional props since the parent form can also handle the submit
Actual Behaviour (*)
Button with type='submit'
and no href
or onClick
shows TS error 2322:
Property 'href' is missing in type '{ children: string; type: "submit"; isLoading: boolean; "aria-label": string; }' but required in type '{ onClick?: never; href: string; }'.
Steps to reproduce (*)
Other information (*)
Please include Browser Name and version, OS and version
github-actions commented
This issue is stale because it has been open for a year with no activity. Remove stale label or comment or this will be closed in 7 days.
github-actions commented
This issue was closed because it has been stalled for a year with no activity.