Skip to content

Commit cb5c96a

Browse files
committed
Remote icons due to tsup issues
1 parent 891edee commit cb5c96a

File tree

5 files changed

+34
-4
lines changed

5 files changed

+34
-4
lines changed

packages/react-native-query-devtool/src/components/CopyButton/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22

33
import { Image, Pressable, StyleSheet } from 'react-native';
4+
import Icons from '../../utils/images';
45

56
interface Props {
67
onPress?: () => void;
@@ -10,7 +11,9 @@ const CopyButton: React.FC<Props> = ({ onPress }) => {
1011
return (
1112
<Pressable onPress={onPress}>
1213
<Image
13-
source={require('../../assets/copy.png')}
14+
source={{
15+
uri: Icons.CopyIcon,
16+
}}
1417
style={styles.container}
1518
/>
1619
</Pressable>

packages/react-native-query-devtool/src/components/FloatingButton/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React from 'react';
33
import { Image, TouchableOpacity } from 'react-native';
44

55
import { styles } from './styles';
6+
import Icons from '../../utils/images';
67

78
interface Props {
89
onPress: () => void;
@@ -15,7 +16,12 @@ const FloatingButton: React.FC<Props> = ({ onPress }) => {
1516
onPress={onPress}
1617
style={styles.container}
1718
>
18-
<Image style={styles.image} source={require('../../assets/rqlogo.png')} />
19+
<Image
20+
style={styles.image}
21+
source={{
22+
uri: Icons.RQLogo,
23+
}}
24+
/>
1925
</TouchableOpacity>
2026
);
2127
};

packages/react-native-query-devtool/src/components/SearchButton/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React from 'react';
22

33
import { Image, Pressable, StyleSheet } from 'react-native';
4+
import Icons from '../../utils/images';
45

56
interface Props {
67
onPress?: () => void;
@@ -10,7 +11,9 @@ const SearchButton: React.FC<Props> = ({ onPress }) => {
1011
return (
1112
<Pressable onPress={onPress}>
1213
<Image
13-
source={require('../../assets/search.png')}
14+
source={{
15+
uri: Icons.SearchIcon,
16+
}}
1417
style={styles.container}
1518
/>
1619
</Pressable>

packages/react-native-query-devtool/src/components/Searchbar/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Image, TextInput, TouchableOpacity, View } from 'react-native';
44

55
import { styles } from './style';
66
import SearchbarProps from './types';
7+
import Icons from '../../utils/images';
78

89
const Searchbar: React.ForwardRefRenderFunction<TextInput, SearchbarProps> = (
910
{ filter, placeholder = 'Filter', setFilter },
@@ -27,7 +28,11 @@ const Searchbar: React.ForwardRefRenderFunction<TextInput, SearchbarProps> = (
2728
activeOpacity={0.8}
2829
onPress={() => setFilter('')}
2930
>
30-
<Image source={require('../../assets/clear.png')} />
31+
<Image
32+
source={{
33+
uri: Icons.SearchIcon,
34+
}}
35+
/>
3136
</TouchableOpacity>
3237
)}
3338
</View>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// TODO (Temporal work-around)
2+
const Icons = {
3+
CopyIcon:
4+
'https://github.com/jossydeleon/react-native-query-devtool-monorepo/blob/feature/packages/react-native-query-devtool/assets/copy.png?raw=true',
5+
SearchIcon:
6+
'https://github.com/jossydeleon/react-native-query-devtool-monorepo/blob/feature/packages/react-native-query-devtool/assets/search.png?raw=true',
7+
ClearIcon:
8+
'https://github.com/jossydeleon/react-native-query-devtool-monorepo/blob/feature/packages/react-native-query-devtool/assets/clear.png?raw=true',
9+
RQLogo:
10+
'https://github.com/jossydeleon/react-native-query-devtool-monorepo/blob/feature/packages/react-native-query-devtool/assets/rqlogo.png?raw=true',
11+
};
12+
13+
export default Icons;

0 commit comments

Comments
 (0)