Files
react-native/ReactCommon/fabric/components/textinput/iostextinput/TextInputProps.h
T
Valentin Shergin ce9cf3795a Fabric: <TextInput> component on iOS, the C++ part
Summary:
This is C++ part of the implementation of Fabric-compatible <TextInput> component on iOS.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: JoshuaGross

Differential Revision: D19169987

fbshipit-source-id: e2eac9beac6d1e124b5176b4a23676b8e05490c3
2020-01-13 23:22:09 -08:00

68 lines
1.7 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.
*/
#pragma once
#include <react/attributedstring/ParagraphAttributes.h>
#include <react/attributedstring/TextAttributes.h>
#include <react/components/iostextinput/conversions.h>
#include <react/components/iostextinput/primitives.h>
#include <react/components/text/BaseTextProps.h>
#include <react/components/view/ViewProps.h>
#include <react/core/Props.h>
#include <react/core/propsConversions.h>
#include <react/graphics/Color.h>
#include <react/imagemanager/primitives.h>
#include <vector>
namespace facebook {
namespace react {
class TextInputProps final : public ViewProps, public BaseTextProps {
public:
TextInputProps() = default;
TextInputProps(TextInputProps const &sourceProps, RawProps const &rawProps);
#pragma mark - Props
TextInputTraits const traits{};
ParagraphAttributes const paragraphAttributes{};
std::string const defaultValue{};
std::string const placeholder{};
SharedColor const placeholderTextColor{};
int maxLength{};
/*
* Tint colors
*/
SharedColor const cursorColor{};
SharedColor const selectionColor{};
// TODO: Rename to `tintColor` and make universal.
SharedColor const underlineColorAndroid{};
/*
* "Private" (only used by TextInput.js) props
*/
std::string const text{};
/*
* Accessors
*/
TextAttributes getEffectiveTextAttributes() const;
ParagraphAttributes getEffectiveParagraphAttributes() const;
#ifdef ANDROID
folly::dynamic getDynamic() const;
#endif
};
} // namespace react
} // namespace facebook