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

Make the transform prop behave similarly with strings or objects

Open Floriferous opened this issue 4 years ago • 2 comments

The transform prop is documented as accepting both a string or an object. However, it seems that they are not the same. The following 2 examples do not behave the same way when applied to the FontAwesomeIcon component:

// Both are applied
transform="shrink-2 rotate-45"

// Only rotate is applied
transform={{ shrink: 2, rotate: 45 }}

It is especially confusing as they are documented next to each other in the advanced section of the README.

It is therefore not clear which transform operations are supported in object format, and which ones aren't. I would expect both to behave exactly the same.

Floriferous avatar Apr 16 '20 12:04 Floriferous

@Floriferous does this do a better job of explaining things?

https://fontawesome.com/how-to-use/with-the-api/methods/parse-transform

robmadole avatar Apr 17 '20 16:04 robmadole

Well sure, but it does not address my issue. I expect shrink to work in the object form, and the documentation is not clear about the fact that it doesn’t.

Floriferous avatar Apr 20 '20 17:04 Floriferous