-
-
Notifications
You must be signed in to change notification settings - Fork 457
Expand file tree
/
Copy pathShadowNodes.h
More file actions
46 lines (36 loc) · 1.48 KB
/
ShadowNodes.h
File metadata and controls
46 lines (36 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen)
* and copied to the cpp directory to add custom state and set shadow node trait as a LeafYogaNode.
*
* @generated by codegen project: GenerateShadowNodeH.js
*/
#pragma once
#include "RNDateTimePickerState.h"
#include <react/renderer/components/RNDateTimePickerCGen/EventEmitters.h>
#include <react/renderer/components/RNDateTimePickerCGen/Props.h>
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
#include <jsi/jsi.h>
#include <react/renderer/core/LayoutContext.h>
namespace facebook {
namespace react {
JSI_EXPORT extern const char RNDateTimePickerComponentName[];
/*
* `ShadowNode` for <RNDateTimePicker> component.
*/
class JSI_EXPORT RNDateTimePickerShadowNode final : public ConcreteViewShadowNode<RNDateTimePickerComponentName, RNDateTimePickerProps, RNDateTimePickerEventEmitter, RNDateTimePickerState> {
public:
using ConcreteViewShadowNode::ConcreteViewShadowNode;
static ShadowNodeTraits BaseTraits() {
auto traits = ConcreteViewShadowNode::BaseTraits();
traits.set(ShadowNodeTraits::Trait::LeafYogaNode);
return traits;
}
void setMeasuredHeight(float height) const {
auto style = yogaNode_.style();
style.setDimension(yoga::Dimension::Height, yoga::StyleSizeLength::points(height));
yogaNode_.setStyle(style);
yogaNode_.setDirty(true);
}
};
} // namespace react
} // namespace facebook