import { forwardRef } from 'react'; import { ActivityIndicator, Pressable, type PressableProps, Text, View, } from 'react-native'; import { colors } from '@/lib/colors'; type Variant = 'primary' | 'secondary' | 'ghost'; type Size = 'sm' | 'md' | 'lg'; type Props = Omit & { label: string; variant?: Variant; size?: Size; loading?: boolean; leftSlot?: React.ReactNode; rightSlot?: React.ReactNode; }; const containerBase = 'flex-row items-center justify-center rounded-full active:opacity-90'; const variantContainer: Record = { primary: 'bg-accent', secondary: 'bg-card border border-border', ghost: 'bg-transparent', }; const variantLabel: Record = { primary: 'text-accent-foreground', secondary: 'text-foreground', ghost: 'text-muted-foreground', }; const sizeContainer: Record = { sm: 'px-4 py-2 gap-1.5', md: 'px-6 py-3 gap-2', lg: 'px-8 py-4 gap-2.5', }; const sizeLabel: Record = { sm: 'text-xs', md: 'text-sm', lg: 'text-base', }; // Mirrors the desktop CTA in landing/src/components/SponsorPromo.tsx — // rounded-full, gold accent, uppercase semibold label with wide tracking. export const Button = forwardRef(function Button( { label, variant = 'primary', size = 'md', loading = false, leftSlot, rightSlot, disabled, style, ...rest }, ref, ) { const isPrimary = variant === 'primary'; const isDisabled = disabled || loading; return ( {loading ? ( ) : ( <> {leftSlot} {label} {rightSlot} )} ); });