-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
OwningShadowNodeFragment
to a separate file
- Loading branch information
Showing
3 changed files
with
32 additions
and
18 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
cpp/react/renderer/components/RNLiveMarkdownSpec/MarkdownTextInputDecoratorShadowNode.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
cpp/react/renderer/components/RNLiveMarkdownSpec/OwningShadowNodeFragment.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#pragma once | ||
#if defined(RCT_NEW_ARCH_ENABLED) || defined(ANDROID) | ||
|
||
#include <react/renderer/core/Props.h> | ||
#include <react/renderer/core/ShadowNode.h> | ||
#include <react/renderer/core/ShadowNodeFragment.h> | ||
#include <react/renderer/core/State.h> | ||
|
||
using namespace facebook::react; | ||
|
||
namespace expensify { | ||
namespace livemarkdown { | ||
|
||
struct OwningShadowNodeFragment { | ||
Props::Shared props; | ||
ShadowNode::SharedListOfShared children; | ||
State::Shared state; | ||
|
||
operator ShadowNodeFragment() const { | ||
return ShadowNodeFragment { | ||
.props = props, | ||
.children = children, | ||
.state = state | ||
}; | ||
} | ||
}; | ||
|
||
} // namespace livemarkdown | ||
} // namespace expensify | ||
|
||
#endif |