react-native-sfsymbols
react-native-sfsymbols copied to clipboard
Handle layout when width and height not set
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
.