Kantongku: content area dengan pojok atas rounded di atas teal

This commit is contained in:
Bro
2026-08-16 16:13:25 +07:00
parent a93cc7f642
commit 99ee84a998
+11 -11
View File
@@ -12,7 +12,7 @@ import {
Text, Text,
View, View,
} from 'react-native'; } from 'react-native';
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context'; import { SafeAreaView } from 'react-native-safe-area-context';
import { colors } from '../theme/colors'; import { colors } from '../theme/colors';
import { formatRupiah, formatRupiahShort, todayLabel } from '../utils/format'; import { formatRupiah, formatRupiahShort, todayLabel } from '../utils/format';
import { import {
@@ -38,7 +38,6 @@ const QUOTES = [
]; ];
export function DashboardScreen() { export function DashboardScreen() {
const insets = useSafeAreaInsets();
const navigation = useNavigation<BottomTabNavigationProp<RootTabParamList>>(); const navigation = useNavigation<BottomTabNavigationProp<RootTabParamList>>();
const [balance, setBalance] = useState(0); const [balance, setBalance] = useState(0);
@@ -204,8 +203,8 @@ export function DashboardScreen() {
return ( return (
<SafeAreaView style={styles.safe} edges={['top']}> <SafeAreaView style={styles.safe} edges={['top']}>
<View style={[styles.statusStrip, { height: insets.top }]} /> <View style={styles.contentWrap}>
<ScrollView style={styles.container} contentContainerStyle={styles.content}> <ScrollView style={styles.container} contentContainerStyle={styles.content}>
<LinearGradient <LinearGradient
colors={['#FFFFFF', '#FFFFFF', colors.background]} colors={['#FFFFFF', '#FFFFFF', colors.background]}
style={styles.header} style={styles.header}
@@ -600,18 +599,19 @@ export function DashboardScreen() {
}) })
)} )}
</ScrollView> </ScrollView>
</View>
</SafeAreaView> </SafeAreaView>
); );
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
safe: { flex: 1, backgroundColor: colors.background }, safe: { flex: 1, backgroundColor: colors.primary },
statusStrip: { contentWrap: {
position: 'absolute', flex: 1,
left: 0, backgroundColor: colors.background,
right: 0, borderTopLeftRadius: 24,
top: 0, borderTopRightRadius: 24,
backgroundColor: colors.primary, overflow: 'hidden',
}, },
container: { flex: 1 }, container: { flex: 1 },
content: { paddingBottom: 32 }, content: { paddingBottom: 32 },