-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathSuggestedPrompts.tsx
More file actions
47 lines (44 loc) · 1.04 KB
/
SuggestedPrompts.tsx
File metadata and controls
47 lines (44 loc) · 1.04 KB
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
42
43
44
45
46
47
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import ColorPalette from '../colors';
interface Props {
prompts: string[];
onSelect: (prompt: string) => void;
}
export default function SuggestedPrompts({ prompts, onSelect }: Props) {
return (
<View style={styles.container}>
{prompts.map((prompt, i) => (
<TouchableOpacity
key={i}
style={styles.chip}
onPress={() => onSelect(prompt)}
>
<Text style={styles.chipText}>{prompt}</Text>
</TouchableOpacity>
))}
</View>
);
}
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
flexWrap: 'wrap',
justifyContent: 'center',
gap: 8,
paddingHorizontal: 16,
paddingTop: 16,
},
chip: {
borderWidth: 1,
borderColor: ColorPalette.blueLight,
borderRadius: 20,
paddingHorizontal: 14,
paddingVertical: 8,
backgroundColor: '#fafbff',
},
chipText: {
fontFamily: 'regular',
fontSize: 13,
color: ColorPalette.primary,
},
});