import { ActivityIndicator, Pressable, StyleSheet, Text } from 'react-native'; import { colors } from '../../../src/theme'; interface Props { label: string; active?: boolean; onPress?: () => void; loading?: boolean; } /** 主按钮:active=高亮可点;false=置灰(未激活) */ export function PrimaryButton({ label, active = true, onPress, loading = false }: Props) { return ( {loading ? : {label}} ); } const styles = StyleSheet.create({ btn: { height: 50, borderRadius: 12, alignItems: 'center', justifyContent: 'center' }, btnActive: { backgroundColor: colors.primary }, btnDisabled: { backgroundColor: colors.textDisabled }, btnText: { fontSize: 17, fontWeight: '700', color: colors.textInverse }, });