* feat: move state wrapper from container view to host view * fix(ios): call updateStateIfNeeded on every state update * fix(ios): handle device rotation and only track width changes * feat(android): align state update flow with iOS * chore: improve clean script with colors
25 lines
699 B
C++
25 lines
699 B
C++
#pragma once
|
|
|
|
#include <react/renderer/components/TrueSheetSpec/TrueSheetViewShadowNode.h>
|
|
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
|
|
namespace facebook::react {
|
|
|
|
/*
|
|
* Descriptor for <TrueSheetView> component.
|
|
*/
|
|
class TrueSheetViewComponentDescriptor final
|
|
: public ConcreteComponentDescriptor<TrueSheetViewShadowNode> {
|
|
using ConcreteComponentDescriptor::ConcreteComponentDescriptor;
|
|
|
|
void adopt(ShadowNode &shadowNode) const override {
|
|
auto &concreteShadowNode =
|
|
static_cast<TrueSheetViewShadowNode &>(shadowNode);
|
|
concreteShadowNode.adjustLayoutWithState();
|
|
|
|
ConcreteComponentDescriptor::adopt(shadowNode);
|
|
}
|
|
};
|
|
|
|
} // namespace facebook::react
|