Kantongku: strip teal tipis di status bar, sisanya putih
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
import { SafeAreaView, useSafeAreaInsets } 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,6 +38,7 @@ 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);
|
||||||
@@ -203,6 +204,7 @@ export function DashboardScreen() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SafeAreaView style={styles.safe} edges={['top']}>
|
<SafeAreaView style={styles.safe} edges={['top']}>
|
||||||
|
<View style={[styles.statusStrip, { height: insets.top }]} />
|
||||||
<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]}
|
||||||
@@ -603,7 +605,14 @@ export function DashboardScreen() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
safe: { flex: 1, backgroundColor: colors.primary },
|
safe: { flex: 1, backgroundColor: colors.background },
|
||||||
|
statusStrip: {
|
||||||
|
position: 'absolute',
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
top: 0,
|
||||||
|
backgroundColor: colors.primary,
|
||||||
|
},
|
||||||
container: { flex: 1 },
|
container: { flex: 1 },
|
||||||
content: { paddingBottom: 32 },
|
content: { paddingBottom: 32 },
|
||||||
header: { paddingHorizontal: 16, paddingTop: 12, paddingBottom: 8, marginBottom: 12 },
|
header: { paddingHorizontal: 16, paddingTop: 12, paddingBottom: 8, marginBottom: 12 },
|
||||||
|
|||||||
Reference in New Issue
Block a user