-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathIterableInboxIcon.tsx
More file actions
41 lines (36 loc) · 986 Bytes
/
IterableInboxIcon.tsx
File metadata and controls
41 lines (36 loc) · 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { Text, StyleSheet, type TextStyle } from 'react-native';
/**
* Props for the IterableInboxIcon component.
*/
export interface IterableInboxIconProps {
/**
* The name of the icon to display.
*/
name: string;
/**
* The style to apply to the icon.
*/
style?: TextStyle;
}
/**
* A fallback icon component that uses Unicode symbols instead of vector icons.
* This allows the inbox to work without requiring react-native-vector-icons.
*/
export const IterableInboxIcon = ({ name, style }: IterableInboxIconProps) => {
// Map of common icon names to Unicode symbols
const iconMap: Record<string, string> = {
'chevron-back-outline': '‹',
'chevron-back': '‹',
'arrow-back': '←',
'back': '←',
};
const iconSymbol = iconMap[name] || '?';
return <Text style={[styles.icon, style]}>{iconSymbol}</Text>;
};
const styles = StyleSheet.create({
icon: {
fontSize: 24,
fontWeight: 'bold',
textAlign: 'center',
},
});