seek-oss / playroom

Design with JSX, powered by your own component library.
MIT License
4.48k stars 182 forks source link

Correctly display widths specified in non-px units #188

Closed jesstelford closed 4 years ago

jesstelford commented 4 years ago

Specifying a width with any unit other than px results in the following:

Screen Shot 2020-09-14 at 1 22 13 pm

ie; it always appends px.

This change uses the assumption that when the width value ends in a number, it is an implicit px value, otherwise, it leaves it alone and uses the exact value supplied for display.

michaeltaranto commented 4 years ago

Hey mate, typescript isn't happy passing a number to the regex test function, just need to parse to a string before testing it

jesstelford commented 4 years ago

🤦 I couldn't replicate the failure locally and had no idea what was going wrong... Turns out I was still on the master branch 🤦

jesstelford commented 4 years ago

Thank you for the pointer. Should be fixed now 🤞

michaeltaranto commented 4 years ago

Thank you sir 🙇