Better Image API Parity with React Native
macintoshhelper opened this issue · 0 comments
macintoshhelper commented
I am...
| -------------------------------------------------------------------------------------------------
Requesting a new feature |
---|
Proposal/Feature-request:
Improve the Image API parity with React Native by adding some of the static methods and extra props like blurRadius
.
The main API method that would be useful is Image.getSize()
to make getting image aspect ratios easier, for better use with the useWindowDimensions
API. It's possible methods like onLayout
could be implemented with the efforts in #472 too.
Implementation details:
- https://github.com/sketch-hq/sketch-reference-files/blob/master/files/123/images/pages/BE059DA8-F958-4C4A-A294-4FFB0713F90C.json#L100-L101
- https://developer.sketch.com/reference/api/#imagedata – (but probably not much use as won't work in Node.js/cross-platform mode)