From ef7c232f7f2cf13be59ea71066c65a43c2bb54ae Mon Sep 17 00:00:00 2001 From: Colby Aley Date: Fri, 10 Apr 2020 12:02:55 -0700 Subject: [PATCH] [ToggleButton] Don't set default for disableRipple prop 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 --- docs/pages/api-docs/toggle-button.md | 2 +- packages/material-ui-lab/src/ToggleButton/ToggleButton.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/pages/api-docs/toggle-button.md b/docs/pages/api-docs/toggle-button.md index 3464f1eecc96aa..3ca33fa12110df 100644 --- a/docs/pages/api-docs/toggle-button.md +++ b/docs/pages/api-docs/toggle-button.md @@ -32,7 +32,7 @@ The `MuiToggleButton` name can be used for providing [default props](/customizat | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | disabled | bool | false | If `true`, the button will be disabled. | | disableFocusRipple | bool | false | If `true`, the keyboard focus ripple will be disabled. `disableRipple` must also be true. | -| disableRipple | bool | false | If `true`, the ripple effect will be disabled. | +| disableRipple | bool | | If `true`, the ripple effect will be disabled. | | selected | bool | | If `true`, the button will be rendered in an active state. | | value * | any | | The value to associate with the button when selected in a ToggleButtonGroup. | diff --git a/packages/material-ui-lab/src/ToggleButton/ToggleButton.js b/packages/material-ui-lab/src/ToggleButton/ToggleButton.js index b80e13a0dff729..bc9f856a0520e6 100644 --- a/packages/material-ui-lab/src/ToggleButton/ToggleButton.js +++ b/packages/material-ui-lab/src/ToggleButton/ToggleButton.js @@ -75,7 +75,6 @@ const ToggleButton = React.forwardRef(function ToggleButton(props, ref) { className, disabled = false, disableFocusRipple = false, - disableRipple = false, onChange, onClick, selected, @@ -114,7 +113,6 @@ const ToggleButton = React.forwardRef(function ToggleButton(props, ref) { onClick={handleChange} onChange={onChange} value={value} - disableRipple={disableRipple} aria-pressed={selected} {...other} >