Skip to content

Commit b6f653c

Browse files
authored
Toast - fix typings (#1333)
* Toast - fix typings * PR review fixes * PR review fixes (2) * PR review fixes (3)
1 parent 49ea644 commit b6f653c

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

typings/components/Toast.d.ts

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
1-
21
import {ReactElement} from 'react';
3-
import {
4-
GestureResponderEvent,
5-
ImageRequireSource,
6-
StyleProp,
7-
TextStyle
8-
} from 'react-native';
2+
import {ImageRequireSource} from 'react-native';
93
import {BaseComponent} from '../commons';
104
import {ColorValue} from '../style/colors';
11-
import {ButtonProps} from './Button';
5+
import {ButtonProps} from '../../generatedTypes';
126

13-
export type ToastPosition = "relative" | "top" | "bottom";
7+
export type ToastPosition = 'top' | 'bottom';
148

159
export interface ToastProps {
1610
visible?: boolean;
1711
position?: ToastPosition;
18-
height?: number;
1912
backgroundColor?: ColorValue;
2013
color?: ColorValue;
2114
message?: string;
22-
messageStyle?: StyleProp<TextStyle>;
2315
icon?: ImageRequireSource;
24-
actions?: ReadonlyArray<ButtonProps>;
25-
onDismiss?: (event: GestureResponderEvent) => void;
16+
action?: ButtonProps;
17+
onDismiss?: () => void;
2618
autoDismiss?: number;
27-
allowDismiss?: boolean;
2819
onAnimationEnd?: (visible: boolean) => void;
29-
renderContent?: (props: ToastProps) => ReactElement | ReactElement[];
3020
centerMessage?: boolean;
31-
animated?: boolean;
32-
enableBlur?: boolean;
3321
zIndex?: number;
22+
showLoader?: boolean;
23+
showDismiss?: boolean;
24+
renderAttachment?: () => React.ReactElement;
25+
customLoader?: () => React.ReactElement;
3426
}
3527

3628
export class Toast extends BaseComponent<ToastProps> {}

0 commit comments

Comments
 (0)