diff --git a/index.d.ts b/index.d.ts index 1c7be73c..b82df9a5 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,5 +1,5 @@ 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 { @@ -22,8 +22,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 diff --git a/src/components/base/index.js b/src/components/base/index.js index 7f78e024..b646e4b2 100644 --- a/src/components/base/index.js +++ b/src/components/base/index.js @@ -91,8 +91,8 @@ BaseToast.propTypes = { leadingIconStyle: ViewPropTypes.style, trailingIconStyle: ViewPropTypes.style, contentContainerStyle: ViewPropTypes.style, - text1Style: ViewPropTypes.style, - text2Style: ViewPropTypes.style, + text1Style: Text.propTypes.style, + text2Style: Text.propTypes.style, activeOpacity: PropTypes.number, text1NumberOfLines: PropTypes.number, text2NumberOfLines: PropTypes.number