ebanutsya
This commit is contained in:
30
src/components/Toast/Toast.tsx
Normal file
30
src/components/Toast/Toast.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import Toast, {BaseToast, ErrorToast, ToastConfig} from 'react-native-toast-message';
|
||||
import {responsiveHeight, responsiveWidth} from "react-native-responsive-dimensions";
|
||||
|
||||
const toastConfig: ToastConfig = {
|
||||
success: (props) => (
|
||||
<BaseToast
|
||||
{...props}
|
||||
|
||||
text1Style={{fontSize: responsiveWidth(3)}}
|
||||
text2Style={{fontSize: responsiveWidth(3)}}
|
||||
style={{
|
||||
width: responsiveWidth(90),
|
||||
height: responsiveHeight(10),
|
||||
borderLeftColor: "green"
|
||||
}}
|
||||
/>),
|
||||
error: (props) => (
|
||||
<BaseToast
|
||||
{...props}
|
||||
text1Style={{fontSize: responsiveWidth(3)}}
|
||||
text2Style={{fontSize: responsiveWidth(3)}}
|
||||
style={{
|
||||
width: responsiveWidth(90),
|
||||
height: responsiveHeight(10),
|
||||
borderLeftColor: "red"
|
||||
|
||||
}}
|
||||
/>),
|
||||
}
|
||||
export default toastConfig;
|
||||
Reference in New Issue
Block a user