Skip to content

Commit cf7a091

Browse files
authored
fix: list item flex properties (#4058)
1 parent 451783f commit cf7a091

File tree

4 files changed

+30
-15
lines changed

4 files changed

+30
-15
lines changed

src/components/List/ListItem.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ const styles = StyleSheet.create({
270270
paddingLeft: 16,
271271
},
272272
content: {
273-
flex: 1,
273+
flexShrink: 1,
274+
flexGrow: 1,
274275
justifyContent: 'center',
275276
},
276277
});

src/components/__tests__/__snapshots__/ListAccordion.test.tsx.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ exports[`renders expanded accordion 1`] = `
219219
"paddingLeft": 16,
220220
},
221221
{
222-
"flex": 1,
222+
"flexGrow": 1,
223+
"flexShrink": 1,
223224
"justifyContent": "center",
224225
},
225226
]

src/components/__tests__/__snapshots__/ListItem.test.tsx.snap

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ exports[`renders list item with custom description 1`] = `
6060
"paddingLeft": 16,
6161
},
6262
{
63-
"flex": 1,
63+
"flexGrow": 1,
64+
"flexShrink": 1,
6465
"justifyContent": "center",
6566
},
6667
]
@@ -383,7 +384,8 @@ exports[`renders list item with custom title and description styles 1`] = `
383384
"paddingLeft": 16,
384385
},
385386
{
386-
"flex": 1,
387+
"flexGrow": 1,
388+
"flexShrink": 1,
387389
"justifyContent": "center",
388390
},
389391
]
@@ -524,7 +526,8 @@ exports[`renders list item with left and right items 1`] = `
524526
"paddingLeft": 16,
525527
},
526528
{
527-
"flex": 1,
529+
"flexGrow": 1,
530+
"flexShrink": 1,
528531
"justifyContent": "center",
529532
},
530533
]
@@ -765,7 +768,8 @@ exports[`renders list item with left item 1`] = `
765768
"paddingLeft": 16,
766769
},
767770
{
768-
"flex": 1,
771+
"flexGrow": 1,
772+
"flexShrink": 1,
769773
"justifyContent": "center",
770774
},
771775
]
@@ -867,7 +871,8 @@ exports[`renders list item with right item 1`] = `
867871
"paddingLeft": 16,
868872
},
869873
{
870-
"flex": 1,
874+
"flexGrow": 1,
875+
"flexShrink": 1,
871876
"justifyContent": "center",
872877
},
873878
]
@@ -972,7 +977,8 @@ exports[`renders list item with title and description 1`] = `
972977
"paddingLeft": 16,
973978
},
974979
{
975-
"flex": 1,
980+
"flexGrow": 1,
981+
"flexShrink": 1,
976982
"justifyContent": "center",
977983
},
978984
]
@@ -1106,7 +1112,8 @@ exports[`renders with a description with typeof number 1`] = `
11061112
"paddingLeft": 16,
11071113
},
11081114
{
1109-
"flex": 1,
1115+
"flexGrow": 1,
1116+
"flexShrink": 1,
11101117
"justifyContent": "center",
11111118
},
11121119
]

src/components/__tests__/__snapshots__/ListSection.test.tsx.snap

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ exports[`renders list section with custom title style 1`] = `
331331
"paddingLeft": 16,
332332
},
333333
{
334-
"flex": 1,
334+
"flexGrow": 1,
335+
"flexShrink": 1,
335336
"justifyContent": "center",
336337
},
337338
]
@@ -484,7 +485,8 @@ exports[`renders list section with custom title style 1`] = `
484485
"paddingLeft": 16,
485486
},
486487
{
487-
"flex": 1,
488+
"flexGrow": 1,
489+
"flexShrink": 1,
488490
"justifyContent": "center",
489491
},
490492
]
@@ -856,7 +858,8 @@ exports[`renders list section with subheader 1`] = `
856858
"paddingLeft": 16,
857859
},
858860
{
859-
"flex": 1,
861+
"flexGrow": 1,
862+
"flexShrink": 1,
860863
"justifyContent": "center",
861864
},
862865
]
@@ -1009,7 +1012,8 @@ exports[`renders list section with subheader 1`] = `
10091012
"paddingLeft": 16,
10101013
},
10111014
{
1012-
"flex": 1,
1015+
"flexGrow": 1,
1016+
"flexShrink": 1,
10131017
"justifyContent": "center",
10141018
},
10151019
]
@@ -1341,7 +1345,8 @@ exports[`renders list section without subheader 1`] = `
13411345
"paddingLeft": 16,
13421346
},
13431347
{
1344-
"flex": 1,
1348+
"flexGrow": 1,
1349+
"flexShrink": 1,
13451350
"justifyContent": "center",
13461351
},
13471352
]
@@ -1494,7 +1499,8 @@ exports[`renders list section without subheader 1`] = `
14941499
"paddingLeft": 16,
14951500
},
14961501
{
1497-
"flex": 1,
1502+
"flexGrow": 1,
1503+
"flexShrink": 1,
14981504
"justifyContent": "center",
14991505
},
15001506
]

0 commit comments

Comments
 (0)