We're shadowing type='submit' for <button> because type is used to declare primary, secondary, and so on.
|
<button |
|
disabled={isDisabled} |
|
className={classes} |
|
{...rest} |
We should either rename type to something else such as hue='danger', or add a submit prop that results in <button type='submit'>.
Both approaches have their pros and cons. type fits the button "roles" very well, role would also clash with aria props, etc. At the same time, submit={ Boolean } wouldn't fix support for <button type='button'> either.
We're shadowing
type='submit'for<button>becausetypeis used to declareprimary,secondary, and so on.eui/src/components/button/button.js
Lines 74 to 77 in 52636ec
We should either rename
typeto something else such ashue='danger', or add asubmitprop that results in<button type='submit'>.Both approaches have their pros and cons.
typefits the button "roles" very well,rolewould also clash withariaprops, etc. At the same time,submit={ Boolean }wouldn't fix support for<button type='button'>either.