Files
mobile-darmasaba/components/toastCustom.tsx
amaliadwiy c01a1885c2 fix : toast
Deskripsi:
- bisa custom posisi toast alert

No Issues
2025-08-27 11:39:46 +08:00

16 lines
560 B
TypeScript

import Styles from "@/constants/Styles";
import { View } from "react-native";
import Toast from "react-native-toast-message";
import Text from "./Text";
export default function ToastCustom({ position }: { position?: 'top' | 'bottom' }) {
return (
<Toast autoHide onPress={() => Toast.hide()} visibilityTime={1500} position={position || 'bottom'} config={{
small: ({ text1 }) => (
<View style={[Styles.toastContainer]}>
<Text style={{ fontSize: 12 }}>{text1}</Text>
</View>
)
}} />
)
}