54 lines
1.2 KiB
TypeScript
54 lines
1.2 KiB
TypeScript
import React from "react";
|
|
import { TouchableOpacity, Text, StyleSheet, Platform } from "react-native";
|
|
import { Ionicons } from "@expo/vector-icons";
|
|
|
|
interface FilterButtonProps {
|
|
onPress?: () => void;
|
|
}
|
|
|
|
export default function FilterButton({ onPress }: FilterButtonProps) {
|
|
return (
|
|
<TouchableOpacity
|
|
style={styles.button}
|
|
onPress={onPress}
|
|
activeOpacity={0.7}
|
|
>
|
|
<Ionicons name="filter" size={20} color="#374151" />
|
|
<Text style={styles.text}>Bộ lọc</Text>
|
|
</TouchableOpacity>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
button: {
|
|
flexDirection: "row",
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
backgroundColor: "#FFFFFF",
|
|
borderRadius: 12,
|
|
paddingHorizontal: 20,
|
|
paddingVertical: 12,
|
|
borderWidth: 1,
|
|
borderColor: "#E5E7EB",
|
|
shadowColor: "#000",
|
|
shadowOffset: {
|
|
width: 0,
|
|
height: 1,
|
|
},
|
|
shadowOpacity: 0.05,
|
|
shadowRadius: 2,
|
|
elevation: 1,
|
|
},
|
|
text: {
|
|
fontSize: 16,
|
|
fontWeight: "500",
|
|
color: "#374151",
|
|
marginLeft: 8,
|
|
fontFamily: Platform.select({
|
|
ios: "System",
|
|
android: "Roboto",
|
|
default: "System",
|
|
}),
|
|
},
|
|
});
|