Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update typings definitions #127

Merged
merged 8 commits into from
Jan 16, 2021
9 changes: 5 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React from 'react';
import { ViewStyle, ImageSourcePropType } from 'react-native'
import { ViewStyle, TextStyle, ImageSourcePropType } from 'react-native'

declare module 'react-native-toast-message' {
interface AnyObject {
[key: string]: any;
}

export type ToastPosition = 'top' | 'bottom'
export type ToastType = 'success' | 'error' | 'info'

export interface BaseToastProps {
leadingIcon?: ImageSourcePropType,
Expand All @@ -22,8 +23,8 @@ declare module 'react-native-toast-message' {
leadingIconStyle?: ViewStyle,
trailingIconStyle?: ViewStyle,
contentContainerStyle?: ViewStyle,
text1Style?: ViewStyle,
text2Style?: ViewStyle,
text1Style?: TextStyle,
text2Style?: TextStyle,
activeOpacity?: number
}
export const BaseToast: React.FC<BaseToastProps>
Expand All @@ -44,7 +45,7 @@ declare module 'react-native-toast-message' {

export default class Toast extends React.Component<ToastProps> {
static show(options: {
type: string,
type: ToastType,
sapieneptus marked this conversation as resolved.
Show resolved Hide resolved
position?: ToastPosition,
text1?: string,
text2?: string,
Expand Down