Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ButtonBase] Document the type property #11728

Merged
merged 2 commits into from
Jun 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/material-ui/src/ButtonBase/ButtonBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,9 @@ ButtonBase.propTypes = {
*/
TouchRippleProps: PropTypes.object,
/**
* @ignore
* Used to control the button's purpose.
* This property passes the value to the `type` attribute of the native button component.
* Valid property values include `button`, `submit`, and `reset`.
*/
type: PropTypes.string,
};
Expand Down
1 change: 1 addition & 0 deletions pages/api/button-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ It contains a load of style reset and some focus/ripple logic.
| <span class="prop-name">focusVisibleClassName</span> | <span class="prop-type">string |   | This property can help a person know which element has the keyboard focus. The class name will be applied when the element gain the focus throught a keyboard interaction. It's a polyfill for the [CSS :focus-visible feature](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo). The rational for using this feature [is explain here](https://github.com/WICG/focus-visible/blob/master/explainer.md). |
| <span class="prop-name">onFocusVisible</span> | <span class="prop-type">func |   | Callback fired when the component is focused with a keyboard. We trigger a `onFocus` callback too. |
| <span class="prop-name">TouchRippleProps</span> | <span class="prop-type">object |   | Properties applied to the `TouchRipple` element. |
| <span class="prop-name">type</span> | <span class="prop-type">string | <span class="prop-default">'button'</span> | Used to control the button's purpose. This property passes the value to the `type` attribute of the native button component. Valid property values include `button`, `submit`, and `reset`. |

Any other properties supplied will be spread to the root element (native element).

Expand Down