import React from 'react'; import { YStack, XStack } from '@tamagui/stacks'; import { SizableText as Text } from '@tamagui/text'; import { Pressable } from '@tamagui/react-native-web-lite'; import { useTheme } from '@tamagui/core'; export function MobileCard({ children, ...rest }: React.ComponentProps) { const theme = useTheme(); return ( {children} ); } export function PillBadge({ tone = 'muted', children, }: { tone?: 'success' | 'warning' | 'muted'; children: React.ReactNode; }) { const theme = useTheme(); const palette: Record = { success: { bg: String(theme.backgroundStrong?.val ?? '#ecfdf3'), text: String(theme.green10?.val ?? '#047857'), border: String(theme.green6?.val ?? '#bbf7d0'), }, warning: { bg: String(theme.yellow3?.val ?? '#fffbeb'), text: String(theme.yellow11?.val ?? '#92400e'), border: String(theme.yellow6?.val ?? '#fef3c7'), }, muted: { bg: String(theme.gray3?.val ?? '#f3f4f6'), text: String(theme.gray11?.val ?? '#374151'), border: String(theme.gray6?.val ?? '#e5e7eb'), }, }; const colors = palette[tone] ?? palette.muted; return ( {children} ); } export function CTAButton({ label, onPress, tone = 'primary', fullWidth = true, disabled = false, loading = false, }: { label: string; onPress: () => void; tone?: 'primary' | 'ghost'; fullWidth?: boolean; disabled?: boolean; loading?: boolean; }) { const theme = useTheme(); const isPrimary = tone === 'primary'; const isDisabled = disabled || loading; return ( {label} ); } export function KpiTile({ icon: IconCmp, label, value, }: { icon: React.ComponentType<{ size?: number; color?: string }>; label: string; value: string | number; }) { const theme = useTheme(); return ( {label} {value} ); } export function ActionTile({ icon: IconCmp, label, color, onPress, disabled = false, }: { icon: React.ComponentType<{ size?: number; color?: string }>; label: string; color: string; onPress?: () => void; disabled?: boolean; }) { const theme = useTheme(); const text = String(theme.color12?.val ?? theme.color?.val ?? '#f8fafc'); return ( {label} ); }