mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-15 01:22:29 +08:00
Summary: `accessibilityTraits` and `accessibilityComponentType` were removed on #24344. This PR removes `accessibilityTraits` prop from Fabric as well. [General] [Removed] - Remove `accessibilityTraits` prop from Fabric. Pull Request resolved: https://github.com/facebook/react-native/pull/24643 Differential Revision: D15120193 Pulled By: cpojer fbshipit-source-id: 98440ac447569c26205fc38b93ce2591ccf1a3cf
62 lines
2.0 KiB
C++
62 lines
2.0 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 "AccessibilityProps.h"
|
|
|
|
#include <react/components/view/accessibilityPropsConversions.h>
|
|
#include <react/components/view/propsConversions.h>
|
|
#include <react/core/propsConversions.h>
|
|
#include <react/debug/debugStringConvertibleUtils.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
AccessibilityProps::AccessibilityProps(
|
|
const AccessibilityProps &sourceProps,
|
|
const RawProps &rawProps)
|
|
: accessible(
|
|
convertRawProp(rawProps, "accessible", sourceProps.accessible)),
|
|
accessibilityLabel(convertRawProp(
|
|
rawProps,
|
|
"accessibilityLabel",
|
|
sourceProps.accessibilityLabel)),
|
|
accessibilityHint(convertRawProp(
|
|
rawProps,
|
|
"accessibilityHint",
|
|
sourceProps.accessibilityHint)),
|
|
accessibilityActions(convertRawProp(
|
|
rawProps,
|
|
"accessibilityActions",
|
|
sourceProps.accessibilityActions)),
|
|
accessibilityViewIsModal(convertRawProp(
|
|
rawProps,
|
|
"accessibilityViewIsModal",
|
|
sourceProps.accessibilityViewIsModal)),
|
|
accessibilityElementsHidden(convertRawProp(
|
|
rawProps,
|
|
"accessibilityElementsHidden",
|
|
sourceProps.accessibilityElementsHidden)),
|
|
accessibilityIgnoresInvertColors(convertRawProp(
|
|
rawProps,
|
|
"accessibilityIgnoresInvertColors",
|
|
sourceProps.accessibilityIgnoresInvertColors)),
|
|
testId(convertRawProp(rawProps, "testId", sourceProps.testId)) {}
|
|
|
|
#pragma mark - DebugStringConvertible
|
|
|
|
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
SharedDebugStringConvertibleList AccessibilityProps::getDebugProps() const {
|
|
const auto &defaultProps = AccessibilityProps();
|
|
return SharedDebugStringConvertibleList{
|
|
debugStringConvertibleItem("testId", testId, defaultProps.testId),
|
|
};
|
|
}
|
|
#endif // RN_DEBUG_STRING_CONVERTIBLE
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|