Files
beenvoice-app/components/FilterChip.tsx
T
soconnor 14c880123c Add beenvoice mobile companion app with full dark mode support.
Expo app with dashboard, time clock, invoices, and settings — native tabs, glass UI, theme-aware components, and iOS Live Activities.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 22:36:37 -04:00

58 lines
1.3 KiB
TypeScript

import { Pressable, StyleSheet, Text, View } from "react-native";
import { fonts, radii } from "@/constants/theme";
import { useAppTheme } from "@/contexts/ThemeContext";
type FilterChipProps = {
label: string;
active?: boolean;
onPress: () => void;
};
export function FilterChip({ label, active, onPress }: FilterChipProps) {
const { colors } = useAppTheme();
return (
<Pressable
accessibilityRole="button"
onPress={onPress}
style={[
styles.chip,
{ borderColor: colors.borderGlass, backgroundColor: colors.cardGlass },
active && { backgroundColor: colors.primary, borderColor: colors.primary },
]}
>
<View style={styles.chipInner}>
<Text
style={[
styles.label,
{ color: colors.mutedForeground },
active && { color: colors.primaryForeground },
]}
>
{label}
</Text>
</View>
</Pressable>
);
}
const styles = StyleSheet.create({
chip: {
height: 32,
borderWidth: 1,
borderRadius: radii.pill,
overflow: "hidden",
},
chipInner: {
flex: 1,
justifyContent: "center",
alignItems: "center",
paddingHorizontal: 14,
},
label: {
fontSize: 13,
fontFamily: fonts.bodyMedium,
},
});