Files
beenvoice-app/components/StatusBadge.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

34 lines
933 B
TypeScript

import { StyleSheet, Text, View } from "react-native";
import { fonts, radii, spacing } from "@/constants/theme";
import { useAppTheme } from "@/contexts/ThemeContext";
import { getStatusColor, statusLabels, type InvoiceStatus } from "@/lib/invoice-status";
export function StatusBadge({ status }: { status: InvoiceStatus }) {
const { isDark } = useAppTheme();
const color = getStatusColor(status, isDark);
return (
<View style={[styles.badge, { backgroundColor: `${color}22` }]}>
<Text style={[styles.text, { color }]}>{statusLabels[status]}</Text>
</View>
);
}
const styles = StyleSheet.create({
badge: {
height: 22,
justifyContent: "center",
alignItems: "center",
paddingHorizontal: spacing.sm,
borderRadius: radii.pill,
},
text: {
fontSize: 10,
fontFamily: fonts.bodyBold,
textTransform: "uppercase",
letterSpacing: 0.4,
includeFontPadding: false,
},
});