react-native-sfsymbols icon indicating copy to clipboard operation
react-native-sfsymbols copied to clipboard

Handle layout when width and height not set

Open jacobp100 opened this issue 2 years ago • 4 comments

We can get RN to use the size of the symbol when doing layouts using shadow nodes. We do something similar in react-native-safe-area-context - where when you set margin, padding, or border properties, it'll add the safe area on top (code).

We could do the same thing - so when the user sets a width or height, use those values. But when they're not set, we can populate the them from the sf symbol itself.

If the user wanted to, they can get these values using onLayout.

jacobp100 avatar Apr 06 '22 12:04 jacobp100