Open murtada58 opened 2 years ago
Nice! A detail: since the original code is coercing rc to a number, you my want to use Array.isArray to detect the new use case, and fall back to rc = +rc if not an array, so as not to introduce a breaking change for users who might be (inadvertently) calling cornerRadius("10").
This would also need documentation and an example.
I've updated the readme with an example now, let me know if there is anything else :)
Allow rounding of individual corners by passing in an array instead of a number following CSS border radius conventions for which corners get rounded if array has less than 4 numbers and backwards compatible with old method of passing in a single number which will round all 4 corners