From 52f6c4adabaeadbc70b7a0d4fca1bbd6fb73cbc0 Mon Sep 17 00:00:00 2001 From: Javi Velasco Date: Sat, 21 Jan 2017 12:47:21 +0100 Subject: [PATCH] Fixes #1119 --- components/switch/Switch.js | 5 +++-- components/switch/readme.md | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/switch/Switch.js b/components/switch/Switch.js index 32f1a090..0262d919 100644 --- a/components/switch/Switch.js +++ b/components/switch/Switch.js @@ -16,6 +16,7 @@ const factory = (Thumb) => { onBlur: PropTypes.func, onChange: PropTypes.func, onFocus: PropTypes.func, + ripple: PropTypes.bool, theme: PropTypes.shape({ disabled: PropTypes.string, field: PropTypes.string, @@ -50,7 +51,7 @@ const factory = (Thumb) => { } render () { - const { className, checked, disabled, onChange, theme, ...others } = this.props; //eslint-disable-line no-unused-vars + const { className, checked, ripple, disabled, onChange, theme, ...others } = this.props; //eslint-disable-line no-unused-vars const _className = classnames(theme[disabled ? 'disabled' : 'field'], className); return ( diff --git a/components/switch/readme.md b/components/switch/readme.md index 41d81414..9600d764 100644 --- a/components/switch/readme.md +++ b/components/switch/readme.md @@ -56,6 +56,7 @@ This component can be styled by context providing a theme with the key `RTSwitch | `onBlur` | `Function` | | Callback function that is fired when when the switch is blurred.| | `onChange` | `Function` | | Callback function that is fired when the component's value changes.| | `onFocus` | `Function` | | Callback function that is fired when the switch is focused.| +| `ripple` | `Boolean` | | If true, the ripple effect will be disabled.| ## Theme