feat: use dynamics instead of strings for props that can be either string or number (#2238)

# Summary

PR bringing proper support for react-native-reanimated in the library by using dynamics instead of strings for props that can be either string or number.
This commit is contained in:
Wojciech Lewicki
2024-03-05 11:36:17 +01:00
committed by GitHub
parent e332c4ada9
commit 50c2289a2c
118 changed files with 931 additions and 2868 deletions

View File

@@ -70,8 +70,14 @@ using namespace facebook::react;
self.minY = newProps.minY;
self.vbWidth = newProps.vbWidth;
self.vbHeight = newProps.vbHeight;
self.bbWidth = [RNSVGLength lengthWithString:RCTNSStringFromString(newProps.bbWidth)];
self.bbHeight = [RNSVGLength lengthWithString:RCTNSStringFromString(newProps.bbHeight)];
id bbWidth = RNSVGConvertFollyDynamicToId(newProps.bbWidth);
if (bbWidth != nil) {
self.bbWidth = [RCTConvert RNSVGLength:bbWidth];
}
id bbHeight = RNSVGConvertFollyDynamicToId(newProps.bbHeight);
if (bbHeight != nil) {
self.bbHeight = [RCTConvert RNSVGLength:bbHeight];
}
self.align = RCTNSStringFromStringNilIfEmpty(newProps.align);
self.meetOrSlice = intToRNSVGVBMOS(newProps.meetOrSlice);
if (RCTUIColorFromSharedColor(newProps.tintColor)) {