react-resizable icon indicating copy to clipboard operation
react-resizable copied to clipboard

Allowing percentage values for size properties

Open pulveni1 opened this issue 9 years ago • 0 comments

Thanks for opening an issue!

Please select the type of issue you're reporting. For questions.

  • [ ] Bug
  • [X] Feature Request
  • [ ] Question

Problem Report

Would it be possible to allow percentage values for the size properties (i.e. width and height)? I have a component, which is wrapped inside the ResizableBox, but which only need to be resized on the Y axis. The X axis should fill the entire width of the parent. The easiest solution was to pass '100%' to the 'width' property of the ResizableBox. In fact, this trick actually works and the ResizableBox works as expected. Now it would be nice to allow it per PropType definition. Because the component complains about the wrong type passed (string instead of number).. Thanks a lot in advance

System Info

Node Version: Browser: OS:

Reproduction

If this is a bug report, please provide a reproduction of the issue by going to http://www.webpackbin.com/41YFBvekG. Paste a link here to your working reproduction.

pulveni1 avatar Nov 24 '17 14:11 pulveni1