-
Notifications
You must be signed in to change notification settings - Fork 642
Closed
Labels
bugSomething isn't workingSomething isn't workingcomponent: ButtonIssues related to the Button componentIssues related to the Button componentreactsize: sand
Description
Description
IconButton incorrectly allows a leadingIcon prop to be passed to the component.
// IconButton doesn't accept a `leadingIcon` prop.
// This should cause a TypeScript error but it doesn't.
// Instead, it causes a runtime error.
<IconButton leadingIcon={PencilIcon} />Orginally reported by @milemons in this Slack thread
Steps to reproduce
See this StackBlitz for a reproduction of the bug: https://stackblitz.com/edit/react-ts-nyunix?file=App.tsx
Version
v35.14.0
Browser
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcomponent: ButtonIssues related to the Button componentIssues related to the Button componentreactsize: sand