We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 458ed70 commit 6c887b5Copy full SHA for 6c887b5
1 file changed
packages/react-native-ui-lib/src/components/screenFooter/index.tsx
@@ -191,14 +191,10 @@ const ScreenFooter = (props: ScreenFooterProps) => {
191
}
192
193
if (itemsFit === ItemsFit.STRETCH && React.isValidElement(child)) {
194
- if (isHorizontal) {
195
- return (
196
- <View flex centerV key={index}>
197
- {React.cloneElement(child as React.ReactElement<any>, {center: true})}
198
- </View>
199
- );
200
- }
201
- return React.cloneElement(child as React.ReactElement<any>, {center: true});
+ const centeredChild = React.cloneElement(child as React.ReactElement<any>, {center: true});
+ return isHorizontal
+ ? <View flex centerV key={index}>{centeredChild}</View>
+ : centeredChild;
202
203
204
if (isHorizontal && itemsFit === ItemsFit.FIT) {
0 commit comments