Files
react-native/ReactCommon/react/renderer/components/picker/iospicker/PickerComponentDescriptor.h
T
Peter Argany 38cb06cbd3 Initial commit for Fabric Picker
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
2020-10-13 11:19:29 -07:00

27 lines
639 B
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/components/iospicker/PickerShadowNode.h>
#include <react/renderer/core/ConcreteComponentDescriptor.h>
/*
* Descriptor for <Picker> component.
*/
namespace facebook {
namespace react {
class PickerComponentDescriptor final
: public ConcreteComponentDescriptor<PickerShadowNode> {
public:
using ConcreteComponentDescriptor::ConcreteComponentDescriptor;
};
} // namespace react
} // namespace facebook