mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 22:58:19 +00:00
Summary: The biggest change is that (1) the image proxy/observer code from the Image component has been generalized, (2) the four image props for the Slider component are fully supported, (3) a handful of props that were ignored or buggy on iOS now perform as expected. Reviewed By: shergin Differential Revision: D13954892 fbshipit-source-id: bec8ad3407c39a1cb186d9541a73b509dccc92ce
71 lines
2.1 KiB
C++
71 lines
2.1 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/components/slider/SliderProps.h>
|
|
#include <react/components/image/conversions.h>
|
|
#include <react/core/propsConversions.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
SliderProps::SliderProps(
|
|
const SliderProps &sourceProps,
|
|
const RawProps &rawProps)
|
|
: ViewProps(sourceProps, rawProps),
|
|
value(convertRawProp(rawProps, "value", sourceProps.value, value)),
|
|
minimumValue(convertRawProp(
|
|
rawProps,
|
|
"minimumValue",
|
|
sourceProps.minimumValue,
|
|
minimumValue)),
|
|
maximumValue(convertRawProp(
|
|
rawProps,
|
|
"maximumValue",
|
|
sourceProps.maximumValue,
|
|
maximumValue)),
|
|
step(convertRawProp(rawProps, "step", sourceProps.step, step)),
|
|
disabled(
|
|
convertRawProp(rawProps, "disabled", sourceProps.disabled, disabled)),
|
|
minimumTrackTintColor(convertRawProp(
|
|
rawProps,
|
|
"minimumTrackTintColor",
|
|
sourceProps.minimumTrackTintColor,
|
|
minimumTrackTintColor)),
|
|
maximumTrackTintColor(convertRawProp(
|
|
rawProps,
|
|
"maximumTrackTintColor",
|
|
sourceProps.maximumTrackTintColor,
|
|
maximumTrackTintColor)),
|
|
thumbTintColor(convertRawProp(
|
|
rawProps,
|
|
"thumbTintColor",
|
|
sourceProps.thumbTintColor,
|
|
thumbTintColor)),
|
|
trackImage(convertRawProp(
|
|
rawProps,
|
|
"trackImage",
|
|
sourceProps.trackImage,
|
|
trackImage)),
|
|
minimumTrackImage(convertRawProp(
|
|
rawProps,
|
|
"minimumTrackImage",
|
|
sourceProps.minimumTrackImage,
|
|
minimumTrackImage)),
|
|
maximumTrackImage(convertRawProp(
|
|
rawProps,
|
|
"maximumTrackImage",
|
|
sourceProps.maximumTrackImage,
|
|
maximumTrackImage)),
|
|
thumbImage(convertRawProp(
|
|
rawProps,
|
|
"thumbImage",
|
|
sourceProps.thumbImage,
|
|
thumbImage)) {}
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|