Skip to content

Commit

Permalink
add a description to the prop
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Mar 14, 2021
1 parent 650533f commit 3e1e758
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/pages/api-docs/button-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"disableTouchRipple": { "type": { "name": "bool" } },
"focusRipple": { "type": { "name": "bool" } },
"focusVisibleClassName": { "type": { "name": "string" } },
"LinkComponent": { "type": { "name": "elementType" }, "default": "'a'" },
"onFocusVisible": { "type": { "name": "func" } },
"sx": { "type": { "name": "object" } },
"TouchRippleProps": { "type": { "name": "object" } }
Expand Down
1 change: 1 addition & 0 deletions docs/translations/api-docs/button-base/button-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"disableTouchRipple": "If <code>true</code>, the touch ripple effect is disabled.",
"focusRipple": "If <code>true</code>, the base button will have a keyboard focus ripple.",
"focusVisibleClassName": "This prop can help identify which element has keyboard focus. The class name will be applied when the element gains the focus through keyboard interaction. It&#39;s a polyfill for the <a href=\"https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo\">CSS :focus-visible selector</a>. The rationale for using this feature <a href=\"https://github.com/WICG/focus-visible/blob/master/explainer.md\">is explained here</a>. A <a href=\"https://github.com/WICG/focus-visible\">polyfill can be used</a> to apply a <code>focus-visible</code> class to other components if needed.",
"LinkComponent": "The component used to render a link when the <code>href</code> prop is provided.",
"onFocusVisible": "Callback fired when the component is focused with a keyboard. We trigger a <code>onFocus</code> callback too.",
"sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the <a href=\"/system/basics/#the-sx-prop\">`sx` page</a> for more details.",
"TouchRippleProps": "Props applied to the <code>TouchRipple</code> element."
Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui/src/ButtonBase/ButtonBase.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ export interface ButtonBaseTypeMap<P = {}, D extends React.ElementType = 'button
*/
focusVisibleClassName?: string;
/**
* @ignore
* The component used to render a link when the `href` prop is provided.
* @default 'a'
*/
LinkComponent?: React.ElementType;
/**
Expand Down
3 changes: 2 additions & 1 deletion packages/material-ui/src/ButtonBase/ButtonBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ ButtonBase.propTypes /* remove-proptypes */ = {
*/
href: PropTypes /* @typescript-to-proptypes-ignore */.any,
/**
* @ignore
* The component used to render a link when the `href` prop is provided.
* @default 'a'
*/
LinkComponent: PropTypes.elementType,
/**
Expand Down

0 comments on commit 3e1e758

Please sign in to comment.