react-native-toast-message 2.1.4 → 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 CHANGED
@@ -9,6 +9,18 @@ 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
+
18
+ ## [2.1.5]
19
+
20
+ ### Fixed
21
+
22
+ - chore(deps): bump ansi-regex from 4.1.0 to 4.1.1 by [dependabot](https://github.com/dependabot) in [#343](https://github.com/calintamas/react-native-toast-message/pull/343)
23
+
12
24
  ## [2.1.4]
13
25
 
14
26
  ### Fixed
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm version](https://img.shields.io/npm/v/react-native-toast-message)](https://www.npmjs.com/package/react-native-toast-message)
4
4
  [![npm downloads](https://img.shields.io/npm/dw/react-native-toast-message)](https://www.npmjs.com/package/react-native-toast-message)
5
5
  [![Build](https://github.com/calintamas/react-native-toast-message/workflows/tests/badge.svg)](https://github.com/calintamas/react-native-toast-message/actions?query=workflow%3Atests)
6
- [![Coverage Status](https://coveralls.io/repos/github/calintamas/react-native-toast-message/badge.svg?branch=master)](https://coveralls.io/github/calintamas/react-native-toast-message?branch=master)
6
+ [![Coverage Status](https://coveralls.io/repos/github/calintamas/react-native-toast-message/badge.svg?branch=master)](https://coveralls.io/github/calintamas/react-native-toast-message?branch=main)
7
7
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](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 && text1.length > 0 && (<Text testID={getTestId('Text1')} style={[styles.text1, text1Style]} numberOfLines={text1NumberOfLines} ellipsizeMode='tail' {...text1Props}>
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 && text2?.length > 0 && (<Text testID={getTestId('Text2')} style={[styles.text2, text2Style]} numberOfLines={text2NumberOfLines} ellipsizeMode='tail' {...text2Props}>
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>
@@ -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 seconds,
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 seconds after which Toast automatically hides.
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.4",
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": "^7.0.2",
33
+ "@testing-library/react-hooks": "^8.0.0",
34
34
  "@testing-library/react-native": "^9.0.0",
35
- "@types/jest": "^27.0.1",
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": "^7.0.2",
38
+ "husky": "^8.0.1",
39
39
  "import-sort-style-module": "^6.0.0",
40
- "jest": "^27.1.1",
41
- "lint-staged": "^12.1.2",
42
- "metro-react-native-babel-preset": "^0.69.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",