mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add setMargin accepting Dimension
Summary: Changelog: [Internal][Added] - Add `setMargin` accepting `Dimension` in Yoga 2 Reviewed By: Andrey-Mishanin Differential Revision: D39271039 fbshipit-source-id: ff98b23352377b16d353cd6922ee37e48c80e55b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
65db77d849
commit
010cdcdc19
@@ -132,6 +132,10 @@ class FLEX_LAYOUT_EXPORT FlexItemStyleBase {
|
||||
return margin[static_cast<size_t>(edge)];
|
||||
}
|
||||
|
||||
void setMargin(Edge edge, Dimension dimension) {
|
||||
margin[static_cast<size_t>(edge)] = dimension;
|
||||
}
|
||||
|
||||
void setMargin(Edge edge, Float value) {
|
||||
margin[static_cast<size_t>(edge)] = Dimension(value, Unit::Point);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user