Skip to content

Commit

Permalink
[docs][Button][joy] Improve loading prop documentation (#38156)
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 authored Jul 28, 2023
1 parent 33f7939 commit b6e9a6b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion docs/translations/api-docs-joy/button/button.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"fullWidth": {
"description": "If <code>true</code>, the button will take up the full width of its container."
},
"loading": { "description": "If <code>true</code>, the loading indicator is shown." },
"loading": {
"description": "If <code>true</code>, the loading indicator is shown and the button becomes disabled."
},
"loadingIndicator": {
"description": "The node should contain an element with <code>role=&quot;progressbar&quot;</code> with an accessible name. By default we render a <code>CircularProgress</code> that is labelled by the button itself."
},
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-joy/src/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ Button.propTypes /* remove-proptypes */ = {
*/
fullWidth: PropTypes.bool,
/**
* If `true`, the loading indicator is shown.
* If `true`, the loading indicator is shown and the button becomes disabled.
* @default false
*/
loading: PropTypes.bool,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-joy/src/Button/ButtonProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export interface ButtonTypeMap<P = {}, D extends React.ElementType = 'button'> {
*/
variant?: OverridableStringUnion<VariantProp, ButtonPropsVariantOverrides>;
/**
* If `true`, the loading indicator is shown.
* If `true`, the loading indicator is shown and the button becomes disabled.
* @default false
*/
loading?: boolean;
Expand Down

0 comments on commit b6e9a6b

Please sign in to comment.