-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Description
It would be useful to have a rule that forbids elements/components from a list of names.
In my organization we want to ban using <button>
in favor of a custom <Button>
component that is simply:
Button = (props) => <button type="button" {...props}>{props.children}</button>
The reason is to prevent a bug in IE where pressing enter on an input could trigger the click event on a button even when they don't share a parent form if the button has type="submit"
(default if no type
). (https://www.tjvantoll.com/2013/05/22/why-are-enter-keypresses-clicking-my-buttons-in-ie/)