fix: disable tombol detail jika tanggal mulai atau berakhir belum diisi

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-05 16:46:14 +08:00
parent a5e379cc7f
commit 5ad7874a92
7 changed files with 11 additions and 16 deletions

View File

@@ -10,20 +10,22 @@ type Props = {
round?: boolean
error?: boolean
errorText?: string
disabled?: boolean
}
export default function ButtonSelect({ value, onPress, round, error, errorText }: Props) {
export default function ButtonSelect({ value, onPress, round, error, errorText, disabled }: Props) {
const { colors } = useTheme();
return (
<View style={[Styles.mv05]}>
<Pressable onPress={onPress}>
<Pressable onPress={onPress} disabled={disabled}>
<View style={[
Styles.inputRoundForm,
Styles.inputRoundFormRight,
round && Styles.round30,
Styles.pv10,
{ borderColor: colors.icon + '20', backgroundColor: colors.input },
error && { borderColor: "red" }
error && { borderColor: "red" },
disabled && { opacity: 0.4 }
]}>
<Feather name="arrow-right-circle" size={20} color={colors.text} />
<Text style={[{ color: colors.text }]}>{value}</Text>