mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
8e9d3ceddf
Summary: Changelog: [Internal] Log attribution context from the Fabric image component Reviewed By: fkgozali Differential Revision: D23547930 fbshipit-source-id: 125f34dac85ff6ac52a798bb1a36394436cb2c0f
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#include <react/renderer/components/image/ImageProps.h>
|
|
#include <react/renderer/components/image/conversions.h>
|
|
#include <react/renderer/core/propsConversions.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
ImageProps::ImageProps(const ImageProps &sourceProps, const RawProps &rawProps)
|
|
: ViewProps(sourceProps, rawProps),
|
|
sources(convertRawProp(rawProps, "source", sourceProps.sources, {})),
|
|
defaultSources(convertRawProp(
|
|
rawProps,
|
|
"defaultSource",
|
|
sourceProps.defaultSources,
|
|
{})),
|
|
resizeMode(convertRawProp(
|
|
rawProps,
|
|
"resizeMode",
|
|
sourceProps.resizeMode,
|
|
ImageResizeMode::Stretch)),
|
|
blurRadius(
|
|
convertRawProp(rawProps, "blurRadius", sourceProps.blurRadius, {})),
|
|
capInsets(
|
|
convertRawProp(rawProps, "capInsets", sourceProps.capInsets, {})),
|
|
tintColor(
|
|
convertRawProp(rawProps, "tintColor", sourceProps.tintColor, {})),
|
|
internal_analyticTag(convertRawProp(
|
|
rawProps,
|
|
"internal_analyticTag",
|
|
sourceProps.internal_analyticTag,
|
|
{})) {}
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|