ordering-ui-react-native 0.12.71 → 0.12.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.12.71",
3
+ "version": "0.12.72",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -2,7 +2,7 @@ import styled from 'styled-components/native'
2
2
 
3
3
  export const ActiveOrdersContainer = styled.ScrollView`
4
4
  margin-bottom: 20px;
5
- height: ${({ isMiniCards }: { isMiniCards: boolean }) => !isMiniCards ? '150px' : '500px'};
5
+ height: ${({ isMiniCards }: { isMiniCards: boolean }) => !isMiniCards ? '150px' : '220px'};
6
6
  max-height: ${({ isMiniCards }: { isMiniCards: boolean }) => !isMiniCards ? '150px' : '220px'};
7
7
  `
8
8
 
@@ -2,7 +2,7 @@ import styled from 'styled-components/native'
2
2
 
3
3
  export const ActiveOrdersContainer = styled.ScrollView`
4
4
  margin-bottom: 20px;
5
- height: ${({ isMiniCards }: { isMiniCards: boolean }) => !isMiniCards ? '150px' : '500px'};
5
+ height: ${({ isMiniCards }: { isMiniCards: boolean }) => !isMiniCards ? '150px' : '220px'};
6
6
  max-height: ${({ isMiniCards }: { isMiniCards: boolean }) => !isMiniCards ? '150px' : '220px'};
7
7
  `
8
8
 
@@ -73,8 +73,9 @@ const AccountUI = (props: AccountParams) => {
73
73
  console.log('ImagePicker Error: ', response.errorMessage);
74
74
  showToast(ToastType.Error, response.errorMessage);
75
75
  } else {
76
- if (response.uri) {
77
- const url = `data:${response.type};base64,${response.base64}`
76
+ if (response?.assets?.[0]?.uri) {
77
+ const image = response?.assets?.[0]
78
+ const url = `data:${image?.type};base64,${image?.base64}`;
78
79
  handleButtonUpdateClick(null, true, url);
79
80
  } else {
80
81
  showToast(ToastType.Error, t('IMAGE_NOT_FOUND', 'Image not found'));
@@ -2,7 +2,7 @@ import styled from 'styled-components/native'
2
2
 
3
3
  export const ActiveOrdersContainer = styled.ScrollView`
4
4
  margin-bottom: 20px;
5
- height: ${({ isMiniCards }: { isMiniCards: boolean }) => !isMiniCards ? '150px' : '500px'};
5
+ height: ${({ isMiniCards }: { isMiniCards: boolean }) => !isMiniCards ? '150px' : '220px'};
6
6
  max-height: ${({ isMiniCards }: { isMiniCards: boolean }) => !isMiniCards ? '150px' : '220px'};
7
7
  `
8
8
 
@@ -300,14 +300,6 @@ const AddressListUI = (props: AddressListParams) => {
300
300
  />
301
301
  </>
302
302
  )}
303
- {!isFromProfile && addressList?.addresses?.length > 0 && (
304
- <OButton
305
- text={t('CONTINUE', 'Continue')}
306
- style={styles.button}
307
- onClick={() => onNavigatorRedirect()}
308
- textStyle={{ color: theme.colors.white }}
309
- />
310
- )}
311
303
  </AddressListContainer>
312
304
  )}
313
305
  </Container>
@@ -1,8 +1,13 @@
1
1
  import React from 'react';
2
- import styled from 'styled-components/native';
2
+ import { Platform } from 'react-native';
3
+ import styled, { css } from 'styled-components/native';
3
4
 
4
5
  const ContainerStyled = styled.ScrollView`
5
6
  flex: 1;
7
+ ${(props: any) => !props.nopadding && css`
8
+ padding: ${Platform.OS === 'ios' ? '0px 30px 0px' : '30px'};
9
+ `}
10
+ background-color: ${(props: any) => props.theme.colors.backgroundPage};
6
11
  `;
7
12
 
8
13
  const SafeAreaStyled = styled.SafeAreaView`
@@ -10,19 +15,13 @@ const SafeAreaStyled = styled.SafeAreaView`
10
15
  background-color: ${(props: any) => props.theme.colors.backgroundPage};
11
16
  `;
12
17
 
13
- const ContentView = styled.View`
14
- padding-horizontal: 30px;
15
- `
16
-
17
18
 
18
19
  export const Container = (props: any) => {
19
20
  return (
20
21
  <SafeAreaStyled>
21
- <ContainerStyled ref={props?.forwardRef} keyboardShouldPersistTaps='handled'>
22
- <ContentView>
22
+ <ContainerStyled ref={props?.forwardRef} style={props?.style} {...props} keyboardShouldPersistTaps='handled'>
23
23
  {props.children}
24
- </ContentView>
25
24
  </ContainerStyled>
26
25
  </SafeAreaStyled>
27
26
  )
28
- }
27
+ }