fix: kalender divisi

Deskripsi:
- on klik tanggal pertama kali > tampil tanggal salah

No Issues
This commit is contained in:
2025-08-08 12:17:29 +08:00
parent cd16b8ba04
commit 3060ea84a5
2 changed files with 8 additions and 8 deletions

View File

@@ -1,21 +1,22 @@
import Styles from "@/constants/Styles";
import { View } from "react-native";
import { Pressable, View } from "react-native";
import Text from "../Text";
type Props = {
text: string;
isSelected: boolean;
isSign: boolean;
onPress?: () => void;
}
export default function ItemDateCalendar({ text, isSelected, isSign }: Props) {
export default function ItemDateCalendar({ text, isSelected, isSign, onPress }: Props) {
return (
<>
<View style={{ alignItems: 'center' }}>
<Pressable style={{ alignItems: 'center' }} onPress={onPress}>
<Text style={[isSelected ? Styles.cWhite : Styles.cBlack]}>{text}</Text>
<View style={[Styles.signDate, { backgroundColor: isSign ? 'red' : 'transparent' }]}></View>
</View>
</Pressable>
</>
)
}