mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
d34f3638cc
Summary: This diff creates the Android OSS build system for the module react/renderer/components/view As part of this diff I had to remove inner folders of react/renderer/components/view changelog: [internal] internal Reviewed By: fkgozali Differential Revision: D22881703 fbshipit-source-id: afb56b4f7660d000d2abb8ade0ccb60d1adfb371
98 lines
3.6 KiB
C++
98 lines
3.6 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 "YogaStylableProps.h"
|
|
|
|
#include <react/renderer/components/view/conversions.h>
|
|
#include <react/renderer/components/view/propsConversions.h>
|
|
#include <react/renderer/core/propsConversions.h>
|
|
#include <react/renderer/debug/debugStringConvertibleUtils.h>
|
|
#include <yoga/YGNode.h>
|
|
#include <yoga/Yoga.h>
|
|
|
|
#include "conversions.h"
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
YogaStylableProps::YogaStylableProps(
|
|
YogaStylableProps const &sourceProps,
|
|
RawProps const &rawProps)
|
|
: Props(sourceProps, rawProps),
|
|
yogaStyle(convertRawProp(rawProps, sourceProps.yogaStyle)){};
|
|
|
|
#pragma mark - DebugStringConvertible
|
|
|
|
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
SharedDebugStringConvertibleList YogaStylableProps::getDebugProps() const {
|
|
auto const defaultYogaStyle = YGStyle{};
|
|
return {
|
|
debugStringConvertibleItem(
|
|
"direction", yogaStyle.direction(), defaultYogaStyle.direction()),
|
|
debugStringConvertibleItem(
|
|
"flexDirection",
|
|
yogaStyle.flexDirection(),
|
|
defaultYogaStyle.flexDirection()),
|
|
debugStringConvertibleItem(
|
|
"justifyContent",
|
|
yogaStyle.justifyContent(),
|
|
defaultYogaStyle.justifyContent()),
|
|
debugStringConvertibleItem(
|
|
"alignContent",
|
|
yogaStyle.alignContent(),
|
|
defaultYogaStyle.alignContent()),
|
|
debugStringConvertibleItem(
|
|
"alignItems", yogaStyle.alignItems(), defaultYogaStyle.alignItems()),
|
|
debugStringConvertibleItem(
|
|
"alignSelf", yogaStyle.alignSelf(), defaultYogaStyle.alignSelf()),
|
|
debugStringConvertibleItem(
|
|
"positionType",
|
|
yogaStyle.positionType(),
|
|
defaultYogaStyle.positionType()),
|
|
debugStringConvertibleItem(
|
|
"flexWrap", yogaStyle.flexWrap(), defaultYogaStyle.flexWrap()),
|
|
debugStringConvertibleItem(
|
|
"overflow", yogaStyle.overflow(), defaultYogaStyle.overflow()),
|
|
debugStringConvertibleItem(
|
|
"display", yogaStyle.display(), defaultYogaStyle.display()),
|
|
debugStringConvertibleItem(
|
|
"flex", yogaStyle.flex(), defaultYogaStyle.flex()),
|
|
debugStringConvertibleItem(
|
|
"flexGrow", yogaStyle.flexGrow(), defaultYogaStyle.flexGrow()),
|
|
debugStringConvertibleItem(
|
|
"flexShrink", yogaStyle.flexShrink(), defaultYogaStyle.flexShrink()),
|
|
debugStringConvertibleItem(
|
|
"flexBasis", yogaStyle.flexBasis(), defaultYogaStyle.flexBasis()),
|
|
debugStringConvertibleItem(
|
|
"margin", yogaStyle.margin(), defaultYogaStyle.margin()),
|
|
debugStringConvertibleItem(
|
|
"position", yogaStyle.position(), defaultYogaStyle.position()),
|
|
debugStringConvertibleItem(
|
|
"padding", yogaStyle.padding(), defaultYogaStyle.padding()),
|
|
debugStringConvertibleItem(
|
|
"border", yogaStyle.border(), defaultYogaStyle.border()),
|
|
debugStringConvertibleItem(
|
|
"dimensions", yogaStyle.dimensions(), defaultYogaStyle.dimensions()),
|
|
debugStringConvertibleItem(
|
|
"minDimensions",
|
|
yogaStyle.minDimensions(),
|
|
defaultYogaStyle.minDimensions()),
|
|
debugStringConvertibleItem(
|
|
"maxDimensions",
|
|
yogaStyle.maxDimensions(),
|
|
defaultYogaStyle.maxDimensions()),
|
|
debugStringConvertibleItem(
|
|
"aspectRatio",
|
|
yogaStyle.aspectRatio(),
|
|
defaultYogaStyle.aspectRatio()),
|
|
};
|
|
}
|
|
#endif
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|