mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 21:53:30 +00:00
Fabric: Implementation of shadow related props of <View> component
Summary: Quite trivial. Reviewed By: fkgozali Differential Revision: D8344060 fbshipit-source-id: 1e44a2ad78e98699dd0ae7ca2816f8c8349bf6d6
This commit is contained in:
parent
5bb538ab5c
commit
55f8cfe693
@ -72,6 +72,28 @@ using namespace facebook::react;
|
|||||||
self.foregroundColor = RCTUIColorFromSharedColor(newViewProps.foregroundColor);
|
self.foregroundColor = RCTUIColorFromSharedColor(newViewProps.foregroundColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// `shadowColor`
|
||||||
|
if (oldViewProps.shadowColor != newViewProps.shadowColor) {
|
||||||
|
CGColorRef shadowColor = RCTCGColorRefFromSharedColor(newViewProps.shadowColor);
|
||||||
|
self.layer.shadowColor = shadowColor;
|
||||||
|
CGColorRelease(shadowColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
// `shadowOffset`
|
||||||
|
if (oldViewProps.shadowOffset != newViewProps.shadowOffset) {
|
||||||
|
self.layer.shadowOffset = RCTCGSizeFromSize(newViewProps.shadowOffset);
|
||||||
|
}
|
||||||
|
|
||||||
|
// `shadowOpacity`
|
||||||
|
if (oldViewProps.shadowOpacity != newViewProps.shadowOpacity) {
|
||||||
|
self.layer.shadowOpacity = (CGFloat)newViewProps.shadowOpacity;
|
||||||
|
}
|
||||||
|
|
||||||
|
// `shadowRadius`
|
||||||
|
if (oldViewProps.shadowRadius != newViewProps.shadowRadius) {
|
||||||
|
self.layer.shadowRadius = (CGFloat)newViewProps.shadowRadius;
|
||||||
|
}
|
||||||
|
|
||||||
// `backfaceVisibility`
|
// `backfaceVisibility`
|
||||||
if (oldViewProps.backfaceVisibility != newViewProps.backfaceVisibility) {
|
if (oldViewProps.backfaceVisibility != newViewProps.backfaceVisibility) {
|
||||||
self.layer.doubleSided = newViewProps.backfaceVisibility;
|
self.layer.doubleSided = newViewProps.backfaceVisibility;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user