component-size icon indicating copy to clipboard operation
component-size copied to clipboard

Breaks on % width

Open tgrrr opened this issue 6 years ago • 2 comments

Hi,

This follows the exact example: https://github.com/rehooks/component-size/blob/master/example.js exactly, and it breaks when there's a 100% height, (as per the example) or 100vh . Works if we set an exact height with px or em.

I understand it can be wrapped with a div. However, 100vh sets the height to 331px.

Using the example in the readme results in a 16x16 image.

https://codesandbox.io/s/ookwxx927y

Cheers

tgrrr avatar Dec 26 '18 15:12 tgrrr

thanks for reporting @tgrrr will fix this and publish a new version!

fouad avatar Feb 11 '19 06:02 fouad

unsure but #28 might solve this, worth a check after it lands

osdiab avatar Mar 04 '20 12:03 osdiab