46 lines
974 B
TypeScript
46 lines
974 B
TypeScript
import Feather from "@expo/vector-icons/Feather";
|
|
import React from "react";
|
|
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
|
|
export default function TagChip({
|
|
icon: _icon,
|
|
label,
|
|
onPress,
|
|
}: {
|
|
icon: any;
|
|
label: string;
|
|
onPress: () => void;
|
|
}) {
|
|
return (
|
|
<TouchableOpacity onPress={onPress} activeOpacity={0.7}>
|
|
<View style={styles.tag}>
|
|
<Text style={styles.tagLabel}>{label}</Text>
|
|
<Feather
|
|
name="x"
|
|
size={14}
|
|
color="rgba(255,255,255,0.5)"
|
|
style={{ marginLeft: 4 }}
|
|
/>
|
|
</View>
|
|
</TouchableOpacity>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
tag: {
|
|
flexDirection: "row",
|
|
alignItems: "center",
|
|
backgroundColor: "rgba(255,255,255,0.12)",
|
|
borderRadius: 8,
|
|
paddingHorizontal: 12,
|
|
paddingVertical: 7,
|
|
marginRight: 8,
|
|
marginBottom: 8,
|
|
},
|
|
tagLabel: {
|
|
color: "white",
|
|
fontSize: 15,
|
|
fontWeight: "400",
|
|
},
|
|
});
|