this repo has no description
1 2/** 3 * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen). 4 * 5 * Do not edit this file as changes may cause incorrect behavior and will be lost 6 * once the code is regenerated. 7 * 8 * @generated by codegen project: GeneratePropsCpp.js 9 */ 10 11#include <react/renderer/components/safeareacontext/Props.h> 12#include <react/renderer/core/PropsParserContext.h> 13#include <react/renderer/core/propsConversions.h> 14 15namespace facebook::react { 16 17RNCSafeAreaProviderProps::RNCSafeAreaProviderProps( 18 const PropsParserContext &context, 19 const RNCSafeAreaProviderProps &sourceProps, 20 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps) 21 22 {} 23 24#ifdef RN_SERIALIZABLE_STATE 25ComponentName RNCSafeAreaProviderProps::getDiffPropsImplementationTarget() const { 26 return "RNCSafeAreaProvider"; 27} 28 29folly::dynamic RNCSafeAreaProviderProps::getDiffProps( 30 const Props* prevProps) const { 31 static const auto defaultProps = RNCSafeAreaProviderProps(); 32 const RNCSafeAreaProviderProps* oldProps = prevProps == nullptr 33 ? &defaultProps 34 : static_cast<const RNCSafeAreaProviderProps*>(prevProps); 35 if (this == oldProps) { 36 return folly::dynamic::object(); 37 } 38 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); 39 40 return result; 41} 42#endif 43RNCSafeAreaViewProps::RNCSafeAreaViewProps( 44 const PropsParserContext &context, 45 const RNCSafeAreaViewProps &sourceProps, 46 const RawProps &rawProps): ViewProps(context, sourceProps, rawProps), 47 48 mode(convertRawProp(context, rawProps, "mode", sourceProps.mode, {RNCSafeAreaViewMode::Padding})), 49 edges(convertRawProp(context, rawProps, "edges", sourceProps.edges, {})) {} 50 51#ifdef RN_SERIALIZABLE_STATE 52ComponentName RNCSafeAreaViewProps::getDiffPropsImplementationTarget() const { 53 return "RNCSafeAreaView"; 54} 55 56folly::dynamic RNCSafeAreaViewProps::getDiffProps( 57 const Props* prevProps) const { 58 static const auto defaultProps = RNCSafeAreaViewProps(); 59 const RNCSafeAreaViewProps* oldProps = prevProps == nullptr 60 ? &defaultProps 61 : static_cast<const RNCSafeAreaViewProps*>(prevProps); 62 if (this == oldProps) { 63 return folly::dynamic::object(); 64 } 65 folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps); 66 67 if (mode != oldProps->mode) { 68 result["mode"] = toDynamic(mode); 69 } 70 71 if (edges != oldProps->edges) { 72 result["edges"] = toDynamic(edges); 73 } 74 return result; 75} 76#endif 77 78} // namespace facebook::react