This commit is contained in:
Mikael Sand
2019-06-20 02:31:07 +03:00
parent b9267fba3a
commit 3fd2523412
2 changed files with 9 additions and 0 deletions
@@ -82,6 +82,11 @@ class SvgViewManager extends ReactViewManager {
node.setTintColor(tintColor);
}
@ReactProp(name = "color", customType = "Color")
public void setColor(SvgView node, @Nullable Integer color) {
node.setTintColor(color);
}
@ReactProp(name = "minX")
public void setMinX(SvgView node, float minX) {
node.setMinX(minX);
+4
View File
@@ -30,6 +30,10 @@ RCT_EXPORT_VIEW_PROPERTY(vbHeight, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(align, NSString)
RCT_EXPORT_VIEW_PROPERTY(meetOrSlice, RNSVGVBMOS)
RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor)
RCT_CUSTOM_VIEW_PROPERTY(color, id, RNSVGSvgView)
{
view.tintColor = [RCTConvert UIColor:json];
}
- (void)toDataURL:(nonnull NSNumber *)reactTag options:(NSDictionary *)options callback:(RCTResponseSenderBlock)callback attempt:(int)attempt {