ordering-ui-react-native 0.21.39-test → 0.21.41-test

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.21.39-test",
3
+ "version": "0.21.41-test",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -1,3 +1,4 @@
1
+ import { OIconButton } from 'ordering-ui-react-native/themes/business/src/components/shared';
1
2
  import React, { useState } from 'react';
2
3
  import {
3
4
  View,
@@ -12,9 +13,11 @@ import {
12
13
  StarDeviceDiscoveryManagerFactory,
13
14
  StarPrinter
14
15
  } from 'react-native-star-io10';
16
+ import { useTheme } from 'styled-components';
15
17
 
16
- export const SearchStarPrinter = () => {
18
+ export const SearchStarPrinter = ({ navigation }: any) => {
17
19
 
20
+ const theme = useTheme();
18
21
  let _manager: StarDeviceDiscoveryManager;
19
22
 
20
23
  const [state, setState] = useState({
@@ -61,8 +64,19 @@ export const SearchStarPrinter = () => {
61
64
  }
62
65
  }
63
66
 
67
+ const handleArrowBack: any = () => {
68
+ navigation?.canGoBack() && navigation.goBack();
69
+ };
70
+
64
71
  return (
65
72
  <View style={{ margin: 50 }}>
73
+ <OIconButton
74
+ icon={theme.images.general.arrow_left}
75
+ iconStyle={{ width: 20, height: 20 }}
76
+ borderColor={theme.colors.clear}
77
+ style={{ maxWidth: 40, justifyContent: 'flex-end' }}
78
+ onClick={() => handleArrowBack()}
79
+ />
66
80
  <View
67
81
  style={{ width: 100, marginTop: 30 }}>
68
82
  <Button
@@ -112,7 +112,7 @@ export const HandleStarPrinter = ({ navigation }: any) => {
112
112
  }
113
113
 
114
114
  const onSearchPrint = () => {
115
- navigation.navigate('HandleStarPrinter')
115
+ navigation.navigate('SearchStarPrinter')
116
116
  }
117
117
 
118
118
  return (
@@ -137,12 +137,12 @@ export const HandleStarPrinter = ({ navigation }: any) => {
137
137
  setPrintState({ identifier: value });
138
138
  }}
139
139
  />
140
- <View style={{ width: 100, marginTop: 20 }}>
141
- <Button
142
- title="Search Printer"
143
- onPress={onSearchPrint}
144
- />
145
- </View>
140
+ </View>
141
+ <View style={{ width: 100, marginTop: 20 }}>
142
+ <Button
143
+ title="Search Printer"
144
+ onPress={onSearchPrint}
145
+ />
146
146
  </View>
147
147
  <View style={{ width: 100, marginTop: 20 }}>
148
148
  <Button