import React from 'react'; import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; import { COLORS, BORDER_RADIUS, FONT_SIZES } from '@/constants/theme'; interface ButtonProps { title: string; onPress: () => void; variant?: 'primary' | 'secondary' | 'danger' | 'ghost'; disabled?: boolean; loading?: boolean; fullWidth?: boolean; } export function Button({ title, onPress, variant = 'primary', disabled = false, loading = false, fullWidth = false, }: ButtonProps) { const variantColors = { primary: { bg: COLORS.primary, text: '#fff' }, secondary: { bg: COLORS.secondary, text: '#fff' }, danger: { bg: COLORS.danger, text: '#fff' }, ghost: { bg: 'transparent', text: COLORS.primary }, }; const colors = variantColors[variant]; return ( {loading ? '...' : title} ); } const styles = StyleSheet.create({ button: { borderRadius: BORDER_RADIUS.md, paddingVertical: 12, paddingHorizontal: 24, alignItems: 'center', justifyContent: 'center', marginVertical: 4, }, fullWidth: { width: '100%', }, text: { fontSize: FONT_SIZES.md, fontWeight: '600', }, });