Files
react-native/ReactCommon/fabric/components/slider/SliderProps.cpp
Joshua Gross c40a782b3a Fabric: Add Fabric-compatible Slider component to iOS
Summary: Fabric-compatible Slider component, minus image support (coming soon!)

Reviewed By: shergin

Differential Revision: D13644717

fbshipit-source-id: ce3f0c1ee530be4807b875cb2080c59693b7337a
2019-01-22 17:03:08 -08:00

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