react-native-material-design icon indicating copy to clipboard operation
react-native-material-design copied to clipboard

Ripple elevation property is incompatible cross-platform

Open dantman opened this issue 7 years ago • 1 comments

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.

dantman avatar Jan 26 '17 12:01 dantman

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.

dantman avatar Jan 26 '17 12:01 dantman