Skip to content

Commit

Permalink
[ToggleButton] Don't set default for disableRipple prop
Browse files Browse the repository at this point in the history
Doing so removes the ability to disable ripples globally, as documented in the
FAQ at https://material-ui.com/getting-started/faq/#how-can-i-disable-the-ripple-effect-globally
  • Loading branch information
cp committed Apr 10, 2020
1 parent df9fc5d commit ef7c232
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion docs/pages/api-docs/toggle-button.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The `MuiToggleButton` name can be used for providing [default props](/customizat
| <span class="prop-name">classes</span> | <span class="prop-type">object</span> | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. |
| <span class="prop-name">disabled</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the button will be disabled. |
| <span class="prop-name">disableFocusRipple</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the keyboard focus ripple will be disabled. `disableRipple` must also be true. |
| <span class="prop-name">disableRipple</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the ripple effect will be disabled. |
| <span class="prop-name">disableRipple</span> | <span class="prop-type">bool</span> | | If `true`, the ripple effect will be disabled. |
| <span class="prop-name">selected</span> | <span class="prop-type">bool</span> | | If `true`, the button will be rendered in an active state. |
| <span class="prop-name required">value&nbsp;*</span> | <span class="prop-type">any</span> | | The value to associate with the button when selected in a ToggleButtonGroup. |

Expand Down
2 changes: 0 additions & 2 deletions packages/material-ui-lab/src/ToggleButton/ToggleButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ const ToggleButton = React.forwardRef(function ToggleButton(props, ref) {
className,
disabled = false,
disableFocusRipple = false,
disableRipple = false,
onChange,
onClick,
selected,
Expand Down Expand Up @@ -114,7 +113,6 @@ const ToggleButton = React.forwardRef(function ToggleButton(props, ref) {
onClick={handleChange}
onChange={onChange}
value={value}
disableRipple={disableRipple}
aria-pressed={selected}
{...other}
>
Expand Down

0 comments on commit ef7c232

Please sign in to comment.