mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-15 21:01:44 +08:00
Summary: Fabric-compatible Slider component, minus image support (coming soon!) Reviewed By: shergin Differential Revision: D13644717 fbshipit-source-id: ce3f0c1ee530be4807b875cb2080c59693b7337a
40 lines
1.2 KiB
C++
40 lines
1.2 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/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)),
|
|
steps(convertRawProp(rawProps, "steps", sourceProps.steps, steps)),
|
|
disabled(
|
|
convertRawProp(rawProps, "disabled", sourceProps.disabled, disabled)),
|
|
minimumTrackTintColor(convertRawProp(
|
|
rawProps,
|
|
"minimumTintColor",
|
|
sourceProps.thumbTintColor,
|
|
thumbTintColor)),
|
|
maximumTrackTintColor(convertRawProp(
|
|
rawProps,
|
|
"maximumTintColor",
|
|
sourceProps.thumbTintColor,
|
|
thumbTintColor)),
|
|
thumbTintColor(convertRawProp(
|
|
rawProps,
|
|
"thumbTintColor",
|
|
sourceProps.thumbTintColor,
|
|
thumbTintColor)) {}
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|