react-native-toast-message 2.1.5 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/lib/src/components/BaseToast.js +2 -2
- package/lib/src/types/index.d.ts +2 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,12 @@ Headers are one of:
|
|
|
9
9
|
|
|
10
10
|
- `Added`, `Changed`, `Removed`, `Fixed` or `Breaking`.
|
|
11
11
|
|
|
12
|
+
## [2.1.6]
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Inline docs for `visibilityTime`. The value is in milliseconds, not seconds; by [johnbillion](https://github.com/johnbillion) in [#429](https://github.com/calintamas/react-native-toast-message/pull/429)
|
|
17
|
+
|
|
12
18
|
## [2.1.5]
|
|
13
19
|
|
|
14
20
|
### Fixed
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/react-native-toast-message)
|
|
4
4
|
[](https://www.npmjs.com/package/react-native-toast-message)
|
|
5
5
|
[](https://github.com/calintamas/react-native-toast-message/actions?query=workflow%3Atests)
|
|
6
|
-
[](https://coveralls.io/github/calintamas/react-native-toast-message?branch=
|
|
6
|
+
[](https://coveralls.io/github/calintamas/react-native-toast-message?branch=main)
|
|
7
7
|
[](https://github.com/prettier/prettier)
|
|
8
8
|
|
|
9
9
|
Animated toast message component for React Native.
|
|
@@ -7,10 +7,10 @@ export function BaseToast({ text1, text2, onPress, activeOpacity, style, touchab
|
|
|
7
7
|
return (<Touchable testID={getTestId('TouchableContainer')} onPress={onPress} activeOpacity={activeOpacity} style={[styles.base, styles.leadingBorder, style]} {...touchableContainerProps}>
|
|
8
8
|
{renderLeadingIcon && renderLeadingIcon()}
|
|
9
9
|
<View testID={getTestId('ContentContainer')} style={[styles.contentContainer, contentContainerStyle]} {...contentContainerProps}>
|
|
10
|
-
{text1
|
|
10
|
+
{(text1?.length ?? 0) > 0 && (<Text testID={getTestId('Text1')} style={[styles.text1, text1Style]} numberOfLines={text1NumberOfLines} ellipsizeMode='tail' {...text1Props}>
|
|
11
11
|
{text1}
|
|
12
12
|
</Text>)}
|
|
13
|
-
{text2
|
|
13
|
+
{(text2?.length ?? 0) > 0 && (<Text testID={getTestId('Text2')} style={[styles.text2, text2Style]} numberOfLines={text2NumberOfLines} ellipsizeMode='tail' {...text2Props}>
|
|
14
14
|
{text2}
|
|
15
15
|
</Text>)}
|
|
16
16
|
</View>
|
package/lib/src/types/index.d.ts
CHANGED
|
@@ -15,13 +15,13 @@ export declare type ToastOptions = {
|
|
|
15
15
|
*/
|
|
16
16
|
position?: ToastPosition;
|
|
17
17
|
/**
|
|
18
|
-
* When `true`, the visible Toast automatically hides after a certain number of
|
|
18
|
+
* When `true`, the visible Toast automatically hides after a certain number of milliseconds,
|
|
19
19
|
* specified by the `visibilityTime` prop.
|
|
20
20
|
* Default value: `true`
|
|
21
21
|
*/
|
|
22
22
|
autoHide?: boolean;
|
|
23
23
|
/**
|
|
24
|
-
* Number of
|
|
24
|
+
* Number of milliseconds after which Toast automatically hides.
|
|
25
25
|
* Has effect only in conjunction with `autoHide` prop set to `true`.
|
|
26
26
|
* Default value: `4000`
|
|
27
27
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-toast-message",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6",
|
|
4
4
|
"description": "Toast message component for React Native",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/core": "^7.15.8",
|
|
32
32
|
"@testing-library/jest-native": "^4.0.4",
|
|
33
|
-
"@testing-library/react-hooks": "^
|
|
33
|
+
"@testing-library/react-hooks": "^8.0.0",
|
|
34
34
|
"@testing-library/react-native": "^9.0.0",
|
|
35
|
-
"@types/jest": "^
|
|
35
|
+
"@types/jest": "^28.1.0",
|
|
36
36
|
"@types/react-native": "^0.67.3",
|
|
37
37
|
"eslint-config-backpacker-react-ts": "^0.3.0",
|
|
38
|
-
"husky": "^
|
|
38
|
+
"husky": "^8.0.1",
|
|
39
39
|
"import-sort-style-module": "^6.0.0",
|
|
40
|
-
"jest": "^
|
|
41
|
-
"lint-staged": "^
|
|
42
|
-
"metro-react-native-babel-preset": "^0.
|
|
40
|
+
"jest": "^28.1.0",
|
|
41
|
+
"lint-staged": "^13.0.0",
|
|
42
|
+
"metro-react-native-babel-preset": "^0.71.0",
|
|
43
43
|
"prettier": "^2.4.1",
|
|
44
44
|
"prettier-plugin-import-sort": "^0.0.7",
|
|
45
45
|
"react-test-renderer": "^17.0.2",
|