Files
react-native/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.h
T
David Vacca 3093010ea5 move fabric to ReactCommon/react/renderer
Summary:
This diff moves fabric C++ code from ReactCommon/fabric to ReactCommon/react/renderer
As part of this diff I also refactored components, codegen and callsites on CatalystApp, FB4A and venice

Script: P137350694

changelog: [internal] internal refactor

Reviewed By: fkgozali

Differential Revision: D22852139

fbshipit-source-id: f85310ba858b6afd81abfd9cbe6d70b28eca7415
2020-07-31 13:34:29 -07:00

73 lines
1.9 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/renderer/attributedstring/ParagraphAttributes.h>
#include <react/renderer/attributedstring/TextAttributes.h>
#include <react/renderer/components/iostextinput/conversions.h>
#include <react/renderer/components/iostextinput/primitives.h>
#include <react/renderer/components/text/BaseTextProps.h>
#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/Props.h>
#include <react/renderer/core/propsConversions.h>
#include <react/renderer/graphics/Color.h>
#include <react/renderer/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{};
int const mostRecentEventCount{0};
bool autoFocus{false};
std::string const inputAccessoryViewID{};
/*
* Accessors
*/
TextAttributes getEffectiveTextAttributes(Float fontSizeMultiplier) const;
ParagraphAttributes getEffectiveParagraphAttributes() const;
#ifdef ANDROID
folly::dynamic getDynamic() const;
#endif
};
} // namespace react
} // namespace facebook