mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This is a starting point for the handwritten Fabric Picker component. It is incomplete, and needs to be landed with the rest of the stack above it. In general, this creates a new `ComponentView`, `ComponentDescriptor`, `ShadowNode`, `Props` and a few other boilerplate classes for Picker. A bunch of the logic in `ComponentView` was copied over from the Paper `RCTPicker` and `RCTPickerManager`. What works in this diff: - A `<Picker>` with items can be created in JS, and a corresponding `UIPicker` is created in native with placeholder text, default styling and the correct amount of items What doesn't work yet (implemented in later diffs): - Parsing items to use correct text and styling in native - Events/commands Reviewed By: sammy-SC Differential Revision: D23941821 fbshipit-source-id: e049ca6004757fbd1361985644d5dbb8f53e1ce6
59 lines
1.7 KiB
Python
59 lines
1.7 KiB
Python
load("@fbsource//tools/build_defs/apple:flag_defs.bzl", "get_preprocessor_flags_for_build_mode")
|
|
load(
|
|
"//tools/build_defs/oss:rn_defs.bzl",
|
|
"ANDROID",
|
|
"APPLE",
|
|
"CXX",
|
|
"YOGA_CXX_TARGET",
|
|
"get_apple_compiler_flags",
|
|
"get_apple_inspector_flags",
|
|
"react_native_xplat_target",
|
|
"rn_xplat_cxx_library",
|
|
"subdir_glob",
|
|
)
|
|
|
|
APPLE_COMPILER_FLAGS = get_apple_compiler_flags()
|
|
|
|
rn_xplat_cxx_library(
|
|
name = "iospicker",
|
|
srcs = glob(
|
|
["**/*.cpp"],
|
|
),
|
|
headers = glob(
|
|
["**/*.h"],
|
|
),
|
|
header_namespace = "",
|
|
exported_headers = subdir_glob(
|
|
[
|
|
("", "*.h"),
|
|
],
|
|
prefix = "react/renderer/components/iospicker",
|
|
),
|
|
compiler_flags = [
|
|
"-fexceptions",
|
|
"-frtti",
|
|
"-std=c++14",
|
|
"-Wall",
|
|
],
|
|
fbobjc_compiler_flags = APPLE_COMPILER_FLAGS,
|
|
fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
|
|
force_static = True,
|
|
labels = ["supermodule:xplat/default/public.react_native.infra"],
|
|
platforms = (ANDROID, APPLE, CXX),
|
|
preprocessor_flags = [
|
|
"-DLOG_TAG=\"ReactNative\"",
|
|
"-DWITH_FBSYSTRACE=1",
|
|
],
|
|
visibility = ["PUBLIC"],
|
|
deps = [
|
|
"//xplat/folly:headers_only",
|
|
YOGA_CXX_TARGET,
|
|
react_native_xplat_target("react/utils:utils"),
|
|
react_native_xplat_target("react/renderer/attributedstring:attributedstring"),
|
|
react_native_xplat_target("react/renderer/core:core"),
|
|
react_native_xplat_target("react/renderer/graphics:graphics"),
|
|
react_native_xplat_target("react/renderer/components/text:text"),
|
|
react_native_xplat_target("react/renderer/components/view:view"),
|
|
],
|
|
)
|