Skip to content

Commit b1cdb7d

Browse files
gedeagasfacebook-github-bot
authored andcommitted
Implementing space-evenly
Summary: So in v0.52.0 space-evenly is introduced but not yet implemented (1050e0b by woehrl01). This pull request implements the space-evenly. Manual Testing. ![notes marker](https://i.imgur.com/IXmezVY.png) [IOS] [FEATURE] [Yoga] Adding space-evenly on justify-content in iOS [ANDROID] [FEATURE] [Yoga] - Adding space-evenly on justify-content in Android Closes #17805 Differential Revision: D6858294 Pulled By: shergin fbshipit-source-id: 7a705ca05f58603ef4588e1bfd16c16a78f8a390
1 parent 3fbf785 commit b1cdb7d

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

Libraries/StyleSheet/LayoutPropTypes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,8 @@ var LayoutPropTypes = {
449449
'flex-end',
450450
'center',
451451
'space-between',
452-
'space-around'
452+
'space-around',
453+
'space-evenly'
453454
]),
454455

455456
/** `alignItems` aligns children in the cross direction.

Libraries/StyleSheet/StyleSheetTypes.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ export type LayoutStyle<+Dimension = DimensionValue> = {
6767
| 'flex-end'
6868
| 'center'
6969
| 'space-between'
70-
| 'space-around',
70+
| 'space-around'
71+
| 'space-evenly',
7172
+alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline',
7273
+alignSelf?:
7374
| 'auto'

React/Base/RCTConvert.m

+2-1
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,8 @@ + (NSPropertyList)NSPropertyList:(id)json
659659
@"flex-end": @(YGJustifyFlexEnd),
660660
@"center": @(YGJustifyCenter),
661661
@"space-between": @(YGJustifySpaceBetween),
662-
@"space-around": @(YGJustifySpaceAround)
662+
@"space-around": @(YGJustifySpaceAround),
663+
@"space-evenly": @(YGJustifySpaceEvenly)
663664
}), YGJustifyFlexStart, intValue)
664665

665666
RCT_ENUM_CONVERTER(YGAlign, (@{

ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.java

+4
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,10 @@ public void setJustifyContent(@Nullable String justifyContent) {
486486
setJustifyContent(YogaJustify.SPACE_AROUND);
487487
break;
488488
}
489+
case "space-evenly": {
490+
setJustifyContent(YogaJustify.SPACE_EVENLY);
491+
break;
492+
}
489493
default: {
490494
throw new JSApplicationIllegalArgumentException(
491495
"invalid value for justifyContent: " + justifyContent);

0 commit comments

Comments
 (0)