Files
mobile-darmasaba/components/sectionCancel.tsx
amaliadwiy b61cd51628 feat: redesign section progress, report, link, file, dan cancel pada project & division/task
- SectionProgress: progress bar animated, badge persentase, label status, task count
- SectionReport: header ikon, left accent border, TextExpandable dengan label Indonesia
- SectionLink: tap langsung buka URL, ikon per domain, long press untuk hapus
- SectionFile: icon container konsisten 30×30 di semua section
- SectionCancel: card subtle dengan warna error, konsisten dengan visual language baru
- TextExpandable: fix bug show/hide tidak muncul setelah content diupdate
- Tambah 14 style class baru di Styles.ts untuk menggantikan inline style
- Terapkan semua perubahan ke fitur division/task
- Fix menu "Edit Tugas" di sectionTanggalTugasTask yang terpotong karena overflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 16:22:52 +08:00

39 lines
1.3 KiB
TypeScript

import Styles from "@/constants/Styles";
import { useTheme } from "@/providers/ThemeProvider";
import { MaterialCommunityIcons } from "@expo/vector-icons";
import { View } from "react-native";
import Text from "./Text";
type Props = {
text?: string
title?: string
}
export default function SectionCancel({ text, title }: Props) {
const { colors } = useTheme();
return (
<View style={[
Styles.wrapPaper,
Styles.mb15,
Styles.sectionCard,
{ backgroundColor: colors.error + '12', borderColor: colors.error + '40' },
]}>
<View style={[Styles.sectionHeader, !text && { marginBottom: 0 }]}>
<View style={[Styles.sectionIconBox, Styles.mr10, { backgroundColor: colors.error + '20' }]}>
<MaterialCommunityIcons name="close-circle-outline" size={18} color={colors.error} />
</View>
<Text style={[Styles.textDefaultSemiBold, { color: colors.error }]}>
{title ?? 'Kegiatan Dibatalkan'}
</Text>
</View>
{text && (
<View style={[Styles.reportContent, { borderLeftColor: colors.error + '50' }]}>
<Text style={[Styles.textDefault, { color: colors.text }]}>{text}</Text>
</View>
)}
</View>
)
}