upd: redesign

This commit is contained in:
2026-02-12 17:52:19 +08:00
parent 8012f7f322
commit 4df0a44ac9
44 changed files with 127 additions and 105 deletions

View File

@@ -13,18 +13,25 @@ type Props = {
}
export default function EventItem({ category, title, user, jamAwal, jamAkhir, onPress }: Props) {
const { theme } = useTheme();
const { theme, colors } = useTheme();
const getBackgroundColor = (cat: 'purple' | 'orange') => {
if (theme === 'dark') {
return cat === 'orange' ? '#5A2D0C' : '#1F2255';
return cat === 'orange' ? '#547792' : '#1D546D';
}
return cat === 'orange' ? '#FED6C5' : '#D8D8F1';
return cat === 'orange' ? '#D6E6F2' : '#A9B5DF';
};
const getStickColor = (cat: 'purple' | 'orange') => {
if (theme === 'dark') {
return cat === 'orange' ? '#94B4C1' : '#5F9598';
}
return cat === 'orange' ? '#F5F5F5' : '#7886C7' ;
};
return (
<Pressable style={[Styles.itemEvent, { backgroundColor: getBackgroundColor(category) }]} onPress={onPress}>
<View style={[Styles.dividerEvent, { backgroundColor: category == 'orange' ? '#FB804C' : '#535FCA' }]} />
<View style={[Styles.dividerEvent, { backgroundColor: getStickColor(category) }]} />
<View style={[Styles.w90]}>
<Text>{jamAwal} - {jamAkhir}</Text>
<Text numberOfLines={1} ellipsizeMode="tail" style={[Styles.textDefaultSemiBold, Styles.mv05]}>{title}</Text>