diff --git a/src/useToast.ts b/src/useToast.ts index 0e782a20..6baa0c15 100644 --- a/src/useToast.ts +++ b/src/useToast.ts @@ -1,4 +1,5 @@ import React from 'react'; +import { TextStyle } from 'react-native'; import { useLogger } from './contexts'; import { useTimeout } from './hooks'; @@ -6,6 +7,21 @@ import { ToastData, ToastOptions, ToastProps, ToastShowParams } from './types'; import { noop } from './utils/func'; import { mergeIfDefined } from './utils/obj'; +export const DEFAULT_TEXT_STYLES: Record = { + text1: { + fontSize: 12, + fontWeight: 'bold', + marginBottom: 2, + color: '#000', + width: '100%' + }, + text2: { + fontSize: 10, + color: '#979797', + width: '100%' + } +}; + export const DEFAULT_DATA: ToastData = { text1: undefined, text2: undefined @@ -13,8 +29,8 @@ export const DEFAULT_DATA: ToastData = { export const DEFAULT_OPTIONS: Required = { type: 'success', - text1Style: null, - text2Style: null, + text1Style: DEFAULT_TEXT_STYLES.text1, + text2Style: DEFAULT_TEXT_STYLES.text2, position: 'top', autoHide: true, visibilityTime: 4000,