react-native-material-design
react-native-material-design copied to clipboard
Ripple elevation property is incompatible cross-platform
The elevation property for the <Ripple> component in lib/Ripple.js does not work properly cross-platform.
On Android the elevation property is passed to a View. Passing a number works, passing an array causes an Error while updating property 'elevation' of a view managed by: RCTView error.
On iOS the elevation property is passed to the <Ripple> polyfill component in lib/polyfill/Ripple.js. Passing an array of two numbers works, passing a number results in an "Invalid prop elevation of type number supplied to Ripple, expected array" warning and does not work.
Ideally polyfill/Ripple would drop the elevation array, Ripple would instead implement it, Ripple would also accept a number when the elevation doesn't change, and Button and other components would stop re-implementing elevation changes on tap and the cross-platform handling that Ripple does.