ordering-ui-react-native 0.12.32 → 0.12.33

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.32",
3
+ "version": "0.12.33",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -143,7 +143,6 @@ OButton.defaultProps = {
143
143
  isDisabled: false,
144
144
  indicatorColor: 'white',
145
145
  activeOpacity: 0.5,
146
- imgRightSrc: require('../../assets/icons/arrow_right.png'),
147
146
  };
148
147
 
149
148
  export default OButton;
@@ -11,7 +11,6 @@ import { NotFoundSource } from '../NotFoundSource'
11
11
  import NavBar from '../NavBar'
12
12
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder'
13
13
 
14
- const addIcon = require('../../assets/icons/add-circular-outlined-button.png')
15
14
 
16
15
  const AddressListUI = (props: AddressListParams) => {
17
16
  const {
@@ -32,6 +31,7 @@ const AddressListUI = (props: AddressListParams) => {
32
31
  } = props
33
32
 
34
33
  const theme = useTheme()
34
+ const addIcon = theme.general?.images?.addCircularOutlined
35
35
 
36
36
  const styles = StyleSheet.create({
37
37
  address: {
@@ -10,9 +10,6 @@ import { TouchableOpacity, ActivityIndicator, StyleSheet, View, Platform, Keyboa
10
10
  import { Header, TitleHeader, Wrapper, QuickMessageContainer } from './styles'
11
11
  import { MessagesParams } from '../../types'
12
12
 
13
- const ImageDummy = require('../../assets/images/image.png')
14
- const paperIcon = require('../../assets/images/paper-plane.png')
15
-
16
13
  const ORDER_STATUS: any = {
17
14
  0: 'ORDER_STATUS_PENDING',
18
15
  1: 'ORDERS_COMPLETED',
@@ -61,8 +58,11 @@ const MessagesUI = (props: MessagesParams) => {
61
58
  const [formattedMessages, setFormattedMessages] = useState<Array<any>>([])
62
59
  const [isKeyboardShow, setIsKeyboardShow] = useState(false)
63
60
  const previousStatus = [1, 2, 5, 6, 10, 11, 12, 16, 17]
64
- const chatDisabled = previousStatus.includes(order?.status)
65
61
 
62
+ const ImageDummy = theme.images?.general?.ImageDummy
63
+ const paperIcon = theme?.images?.general?.paperIcon
64
+
65
+ const chatDisabled = previousStatus.includes(order?.status)
66
66
  const quickMessageList = [
67
67
  { key: 'customer_message_1', text: t('CUSTOMER_MESSAGE_1', 'customer_message_1') },
68
68
  { key: 'customer_message_2', text: t('CUSTOMER_MESSAGE_2', 'customer_message_2') },
@@ -128,7 +128,6 @@ OButton.defaultProps = {
128
128
  isDisabled: false,
129
129
  indicatorColor: 'white',
130
130
  activeOpacity: 0.5,
131
- imgRightSrc: require('../../assets/icons/arrow_right.png')
132
131
  };
133
132
 
134
133
  export default OButton;
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react'
2
- import styled, { css } from 'styled-components/native'
2
+ import styled, { css, useTheme } from 'styled-components/native'
3
3
  import { ScrollView, TouchableOpacity } from 'react-native-gesture-handler'
4
4
  import {
5
5
  ScrollView as CustomScrollView,
@@ -76,6 +76,7 @@ const ODropDown = (props: Props) => {
76
76
  isModal
77
77
  } = props
78
78
 
79
+ const theme = useTheme()
79
80
  const [isOpen, setIsOpen] = useState(false)
80
81
  const defaultOption = options?.find((option: any) => option.value === defaultValue)
81
82
  const [selectedOption, setSelectedOption] = useState<any>(defaultOption)
@@ -114,7 +115,7 @@ const ODropDown = (props: Props) => {
114
115
  <DropIcon
115
116
  textcolor={props.textcolor}
116
117
  secondary={secondary}
117
- source={require('../../assets/icons/drop_down.png')}
118
+ source={theme.images.general.dropDown}
118
119
  />
119
120
  </Selected>
120
121
  {isOpen && options && (
@@ -1,7 +1,7 @@
1
1
 
2
2
  import * as React from 'react'
3
3
  import { ImageStyle } from 'react-native'
4
- import styled from 'styled-components/native'
4
+ import styled, { useTheme } from 'styled-components/native'
5
5
 
6
6
  const Wrapper = styled.View``
7
7
 
@@ -23,10 +23,11 @@ interface Props {
23
23
  }
24
24
 
25
25
  const OImage = (props: Props): React.ReactElement => {
26
+ const theme = useTheme()
26
27
  return (
27
28
  <Wrapper style={{ borderRadius: props.style?.borderRadius, overflow: 'hidden', marginHorizontal: props.style?.marginHorizontal }}>
28
29
  <SImage
29
- source={props.src ? props.src : props.url ? { uri: props.url } : props.dummy ? props.dummy : require('../../assets/icons/lunch.png')}
30
+ source={props.src ? props.src : props.url ? { uri: props.url } : props.dummy ? props.dummy : theme.images.general.lunch}
30
31
  style={{
31
32
  tintColor: props.color,
32
33
  flex: props.isWrap ? 1 : 0,