From d83d7e027e9a114aebba3babdd66d5ba9d1fbdcb Mon Sep 17 00:00:00 2001
From: Philippe Auriach
Date: Thu, 20 Feb 2020 10:28:49 +0100
Subject: [PATCH] Proptypes in typescript definition
---
index.d.ts | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/index.d.ts b/index.d.ts
index 2aa8dba..d349162 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -1,11 +1,21 @@
import { Component, ReactNode } from "react";
+import { StyleProp, View, Text, TextStyle, ViewStyle} from "react-native";
declare module "react-native-easy-toast" {
export interface DURATION {
LENGTH_SHORT: number;
FOREVER: number;
}
- export default class Toast extends Component {
+ export interface ToastProps {
+ style?: StyleProp
+ textStyle?: StyleProp
+ position?: 'top' | 'center' | 'bottom'
+ positionValue?: number
+ fadeInDuration?: number
+ fadeOutDuration?: number
+ opacity?: number
+ }
+ export default class Toast extends Component {
show: (
text: string | ReactNode,
duration?: number,