Skip to content

Commit 93b4f3f

Browse files
use StyleProp for .ts (calintamas#243)
To allow different types of style to be used `(eg. style={[styles.one, styles.two]})`
1 parent 197b7c4 commit 93b4f3f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

index.d.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { ViewStyle, TextStyle, ImageSourcePropType } from 'react-native'
2+
import { StyleProp, ViewStyle, TextStyle, ImageSourcePropType } from 'react-native'
33

44
declare module 'react-native-toast-message' {
55
interface AnyObject {
@@ -16,14 +16,14 @@ declare module 'react-native-toast-message' {
1616
onPress?: () => void,
1717
onTrailingIconPress?: () => void,
1818
onLeadingIconPress?: () => void,
19-
style?: ViewStyle,
20-
leadingIconContainerStyle?: ViewStyle,
21-
trailingIconContainerStyle?: ViewStyle,
22-
leadingIconStyle?: ViewStyle,
23-
trailingIconStyle?: ViewStyle,
24-
contentContainerStyle?: ViewStyle,
25-
text1Style?: TextStyle,
26-
text2Style?: TextStyle,
19+
style?: StyleProp<ViewStyle>,
20+
leadingIconContainerStyle?: StyleProp<ViewStyle>,
21+
trailingIconContainerStyle?: StyleProp<ViewStyle>,
22+
leadingIconStyle?: StyleProp<ViewStyle>,
23+
trailingIconStyle?: StyleProp<ViewStyle>,
24+
contentContainerStyle?: StyleProp<ViewStyle>,
25+
text1Style?: StyleProp<TextStyle>,
26+
text2Style?: StyleProp<TextStyle>,
2727
activeOpacity?: number,
2828
text1NumberOfLines: number,
2929
text2NumberOfLines: number,
@@ -33,7 +33,7 @@ declare module 'react-native-toast-message' {
3333
export interface ToastProps {
3434
ref: (ref: any) => any;
3535
config?: AnyObject,
36-
style?: ViewStyle,
36+
style?: StyleProp<ViewStyle>,
3737
topOffset?: number,
3838
bottomOffset?: number,
3939
keyboardOffset?: number,

0 commit comments

Comments
 (0)