ordering-ui-react-native 0.16.56 → 0.16.57

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.16.56",
3
+ "version": "0.16.57",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -59,7 +59,7 @@ export const PaymentOptionsWebView = (props: PaymentOptionsWebViewParams) => {
59
59
  if (e?.nativeEvent?.data && e?.nativeEvent?.data !== 'undefined') {
60
60
  let payment = JSON.parse(e.nativeEvent.data);
61
61
 
62
- if (payment === 'api error') {
62
+ if (payment === 'api error' || payment === 'Cancelled by user') {
63
63
  setShowGateway({ closedByUser: true, open: false })
64
64
  setProg(true);
65
65
  }
@@ -85,7 +85,7 @@ export const BusinessesListing = (props: any) => {
85
85
  transparent={true}
86
86
  onClose={() => setLastOrderReview({ ...lastOrderReview, isReviewOpen: false, order: defaultOrder })}
87
87
  title={t('HEY', 'Hey! ') + t('HOW_WAS_YOUR_ORDER', 'How was your order?')}
88
- bottomContainerStyle={{ height: 'auto' }}
88
+ bottomContainerStyle={{ height: 'auto', borderRadius: 10 }}
89
89
  titleStyle={{ textAlign: 'center' }}
90
90
  closeIcon={theme.images.general.close}
91
91
  >
@@ -101,7 +101,7 @@ export const ReviewTrigger = (props: any) => {
101
101
  </FormReviews>
102
102
  </View>
103
103
  </ReviewOrderContainer>
104
- <FloatingBottomContainer>
104
+ <FloatingBottomContainer borderTopWidth={0} borderRadius={10}>
105
105
  <ActionContainer>
106
106
  <OButton
107
107
  textStyle={{ color: theme.colors.white, paddingRight: 10 }}
@@ -1,7 +1,7 @@
1
1
  import styled from 'styled-components/native'
2
2
 
3
3
  export const ReviewOrderContainer = styled.ScrollView`
4
- padding: 20px 40px;
4
+ padding: 0 25px;
5
5
  margin-bottom: 100px;
6
6
  `
7
7
 
@@ -13,7 +13,7 @@ export const BusinessLogo = styled.View`
13
13
  export const FormReviews = styled.View`
14
14
  flex: 1;
15
15
  height: 100%;
16
- margin-top: 30px;
16
+ margin-top: 10px;
17
17
  `
18
18
 
19
19
  export const ActionContainer = styled.View`
@@ -47,19 +47,21 @@ const OBottomPopup = (props: Props) => {
47
47
  </TouchableWithoutFeedback>
48
48
  <View style={{ ...styles.bottomContainer, ...bottomContainerStyle }}>
49
49
  <View style={{ paddingTop: top, paddingBottom: bottom }}>
50
- {closeIcon && (
51
- <TouchableOpacity onPress={onClose} style={styles.closeIconStyle}>
52
- <OIcon
53
- src={closeIcon}
54
- width={30}
55
- />
56
- </TouchableOpacity>
57
- )}
58
- {!!title && (
59
- <Text style={{ ...styles.titleStyle, ...titleStyle }}>
60
- {title}
61
- </Text>
62
- )}
50
+ <View style={styles.modalTitleStyle}>
51
+ {closeIcon && (
52
+ <TouchableOpacity onPress={onClose} style={styles.closeIconStyle}>
53
+ <OIcon
54
+ src={closeIcon}
55
+ width={30}
56
+ />
57
+ </TouchableOpacity>
58
+ )}
59
+ {!!title && (
60
+ <Text style={{ ...styles.titleStyle, ...titleStyle }}>
61
+ {title}
62
+ </Text>
63
+ )}
64
+ </View>
63
65
  {children}
64
66
  </View>
65
67
  </View>
@@ -86,12 +88,17 @@ const styles = StyleSheet.create({
86
88
  },
87
89
  titleStyle: {
88
90
  fontSize: 20,
89
- fontWeight: 'bold',
90
- marginVertical: 10
91
+ fontWeight: 'bold'
91
92
  },
92
93
  closeIconStyle: {
93
- paddingTop: 20,
94
- paddingLeft: 20
94
+ position: 'absolute',
95
+ left: 25,
96
+ top: 22.5
97
+ },
98
+ modalTitleStyle: {
99
+ position: 'relative',
100
+ paddingHorizontal: 10,
101
+ paddingVertical: 20
95
102
  }
96
103
  })
97
104
 
@@ -19,7 +19,11 @@ export const Container = styled.View`
19
19
 
20
20
  export const FloatingBottomContainer = (props: any) => {
21
21
  return (
22
- <Container style={{ width: windowWidth }}>
22
+ <Container style={{
23
+ width: windowWidth,
24
+ borderTopWidth: props?.borderTopWidth ?? 1,
25
+ borderRadius: props?.borderRadius ?? 0
26
+ }}>
23
27
  {props.children}
24
28
  </Container>
25
29
  )