From 9c25f9747137048e245459876f65d49074ee2d92 Mon Sep 17 00:00:00 2001 From: Shivam Date: Sun, 14 Nov 2021 10:42:30 +0530 Subject: [PATCH 1/2] feat: add toast types --- src/types/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/index.ts b/src/types/index.ts index 40f80ab2f..4a3206104 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -3,7 +3,7 @@ import { TextStyle, TouchableOpacityProps, ViewStyle } from 'react-native'; export type ReactChildren = React.ReactNode; -export type ToastType = string; +export type ToastType = 'success' | 'error' | 'info'; export type ToastPosition = 'top' | 'bottom'; export type ToastOptions = { From f6e5e6b98e7597752728dcb4d26dc77451329bc0 Mon Sep 17 00:00:00 2001 From: Shivam Date: Sun, 14 Nov 2021 10:45:46 +0530 Subject: [PATCH 2/2] fix: add string type as well --- src/types/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/index.ts b/src/types/index.ts index 4a3206104..03bc97948 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -3,7 +3,7 @@ import { TextStyle, TouchableOpacityProps, ViewStyle } from 'react-native'; export type ReactChildren = React.ReactNode; -export type ToastType = 'success' | 'error' | 'info'; +export type ToastType = 'success' | 'error' | 'info' | string; export type ToastPosition = 'top' | 'bottom'; export type ToastOptions = {