Files
mobile-darmasaba/components/buttonSetting.tsx
amaliadwiy 64aaafa2be upd: setting
Deskripsi:
- buat halaman setting
- isinya edit profile, ganti tema aplikasi, nonaktifkan notifikasi, sign out

No Issues
2026-02-18 15:45:45 +08:00

33 lines
998 B
TypeScript

import Styles from "@/constants/Styles";
import { useTheme } from "@/providers/ThemeProvider";
import { ReactNode } from "react";
import { Pressable, View } from "react-native";
import Text from "./Text";
type Props = {
title: string
onPress?: () => void,
icon?: ReactNode,
borderBottom?: boolean
value?: string
}
export default function ButtonSetting({ title, onPress, icon, borderBottom = true, value }: Props) {
const { colors } = useTheme();
return (
<Pressable onPress={onPress}>
<View style={[
Styles.p10,
Styles.rowSpaceBetween,
{ borderBottomWidth: borderBottom ? 1 : 0, borderColor: colors.icon + '20' },
]}>
<View style={[Styles.rowItemsCenter]}>
{icon}
<Text style={[{ color: colors.text }, Styles.ml05]}>{title}</Text>
</View>
{value && <Text style={[{ color: colors.dimmed }]}>{value}</Text>}
</View>
</Pressable>
)
}