Skip to content

Commit

Permalink
Merge branch 'main' of github.com:EmreKarslan/react-native-toast-message
Browse files Browse the repository at this point in the history
  • Loading branch information
EmreKarslan committed Dec 11, 2023
2 parents 1d86fc9 + 87ae087 commit db591e4
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/useToast.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,36 @@
import React from 'react';
import { TextStyle } from 'react-native';

import { useLogger } from './contexts';
import { useTimeout } from './hooks';
import { ToastData, ToastOptions, ToastProps, ToastShowParams } from './types';
import { noop } from './utils/func';
import { mergeIfDefined } from './utils/obj';

export const DEFAULT_TEXT_STYLES: Record<string, TextStyle> = {
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
};

export const DEFAULT_OPTIONS: Required<ToastOptions> = {
type: 'success',
text1Style: null,
text2Style: null,
text1Style: DEFAULT_TEXT_STYLES.text1,
text2Style: DEFAULT_TEXT_STYLES.text2,
position: 'top',
autoHide: true,
visibilityTime: 4000,
Expand Down

0 comments on commit db591e4

Please sign in to comment.