react-native-toast-message 1.4.9 → 2.0.0-beta.2

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.
Files changed (92) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/README.md +18 -198
  3. package/lib/index.d.ts +6 -0
  4. package/lib/index.js +6 -0
  5. package/lib/src/Toast.d.ts +7 -0
  6. package/lib/src/Toast.js +27 -0
  7. package/lib/src/ToastUI.d.ts +11 -0
  8. package/lib/src/ToastUI.js +40 -0
  9. package/lib/src/components/AnimatedContainer.d.ts +16 -0
  10. package/lib/src/components/AnimatedContainer.js +72 -0
  11. package/lib/src/components/AnimatedContainer.styles.d.ts +14 -0
  12. package/lib/src/components/AnimatedContainer.styles.js +15 -0
  13. package/lib/src/components/BaseToast.d.ts +3 -0
  14. package/lib/src/components/BaseToast.js +19 -0
  15. package/lib/src/components/BaseToast.styles.d.ts +41 -0
  16. package/lib/src/components/BaseToast.styles.js +39 -0
  17. package/lib/src/components/ErrorToast.d.ts +3 -0
  18. package/lib/src/components/ErrorToast.js +5 -0
  19. package/lib/src/components/InfoToast.d.ts +3 -0
  20. package/lib/src/components/InfoToast.js +5 -0
  21. package/lib/src/components/SuccessToast.d.ts +3 -0
  22. package/lib/src/components/SuccessToast.js +5 -0
  23. package/lib/src/components/Touchable.d.ts +8 -0
  24. package/lib/src/components/Touchable.js +7 -0
  25. package/lib/src/contexts/LoggerContext.d.ts +12 -0
  26. package/lib/src/contexts/LoggerContext.js +22 -0
  27. package/lib/src/contexts/index.d.ts +1 -0
  28. package/lib/src/contexts/index.js +1 -0
  29. package/lib/src/hooks/index.d.ts +5 -0
  30. package/lib/src/hooks/index.js +5 -0
  31. package/lib/src/hooks/useKeyboard.d.ts +4 -0
  32. package/lib/src/hooks/useKeyboard.js +31 -0
  33. package/lib/src/hooks/usePanResponder.d.ts +15 -0
  34. package/lib/src/hooks/usePanResponder.js +41 -0
  35. package/lib/src/hooks/useSlideAnimation.d.ts +24 -0
  36. package/lib/src/hooks/useSlideAnimation.js +49 -0
  37. package/lib/src/hooks/useTimeout.d.ts +6 -0
  38. package/lib/src/hooks/useTimeout.js +29 -0
  39. package/lib/src/hooks/useViewDimensions.d.ts +13 -0
  40. package/lib/src/hooks/useViewDimensions.js +20 -0
  41. package/lib/src/types/index.d.ts +165 -0
  42. package/lib/src/types/index.js +1 -0
  43. package/lib/src/useToast.d.ts +13 -0
  44. package/lib/src/useToast.js +79 -0
  45. package/lib/src/utils/array.d.ts +2 -0
  46. package/lib/src/utils/array.js +4 -0
  47. package/lib/src/utils/func.d.ts +1 -0
  48. package/lib/src/utils/func.js +1 -0
  49. package/lib/src/utils/number.d.ts +3 -0
  50. package/lib/src/utils/number.js +9 -0
  51. package/lib/src/utils/obj.d.ts +3 -0
  52. package/lib/src/utils/obj.js +11 -0
  53. package/lib/src/utils/platform.d.ts +1 -0
  54. package/lib/src/utils/platform.js +4 -0
  55. package/lib/src/utils/test-id.d.ts +1 -0
  56. package/lib/src/utils/test-id.js +3 -0
  57. package/package.json +47 -45
  58. package/.github/workflows/publish.yml +0 -22
  59. package/.github/workflows/tag.yml +0 -16
  60. package/.github/workflows/tests.yml +0 -44
  61. package/babel.config.js +0 -3
  62. package/index.d.ts +0 -67
  63. package/index.js +0 -4
  64. package/jest.config.js +0 -5
  65. package/jest.setup.js +0 -1
  66. package/src/assets/icons/close.png +0 -0
  67. package/src/assets/icons/close@2x.png +0 -0
  68. package/src/assets/icons/close@3x.png +0 -0
  69. package/src/assets/icons/error.png +0 -0
  70. package/src/assets/icons/error@2x.png +0 -0
  71. package/src/assets/icons/error@3x.png +0 -0
  72. package/src/assets/icons/info.png +0 -0
  73. package/src/assets/icons/info@2x.png +0 -0
  74. package/src/assets/icons/info@3x.png +0 -0
  75. package/src/assets/icons/success.png +0 -0
  76. package/src/assets/icons/success@2x.png +0 -0
  77. package/src/assets/icons/success@3x.png +0 -0
  78. package/src/assets/index.js +0 -15
  79. package/src/colors/index.js +0 -10
  80. package/src/components/base/index.js +0 -134
  81. package/src/components/base/styles.js +0 -54
  82. package/src/components/error.js +0 -19
  83. package/src/components/icon/index.js +0 -40
  84. package/src/components/icon/styles.js +0 -8
  85. package/src/components/info.js +0 -19
  86. package/src/components/success.js +0 -19
  87. package/src/index.js +0 -420
  88. package/src/styles.js +0 -17
  89. package/src/utils/arr.js +0 -3
  90. package/src/utils/obj.js +0 -9
  91. package/src/utils/platform.js +0 -5
  92. package/src/utils/prop-types.js +0 -5
package/package.json CHANGED
@@ -1,58 +1,60 @@
1
1
  {
2
2
  "name": "react-native-toast-message",
3
- "version": "1.4.9",
3
+ "version": "2.0.0-beta.2",
4
4
  "description": "Toast message component for React Native",
5
- "main": "index.js",
6
- "scripts": {
7
- "hooks:install": "node ./node_modules/husky/bin/install",
8
- "lint": "./node_modules/.bin/eslint . --ext=jsx --ext=js",
9
- "lint-staged": "./node_modules/.bin/lint-staged",
10
- "prettier": "./node_modules/.bin/prettier . --write",
11
- "test": "./node_modules/.bin/jest"
12
- },
13
- "lint-staged": {
14
- "**/*.js": [
15
- "prettier --write",
16
- "eslint"
17
- ]
18
- },
19
- "husky": {
20
- "hooks": {
21
- "pre-commit": "lint-staged"
22
- }
5
+ "main": "./lib/index.js",
6
+ "types": "./lib/index.d.ts",
7
+ "files": [
8
+ "/lib"
9
+ ],
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/calintamas/react-native-toast-message.git"
23
13
  },
24
14
  "keywords": [
25
15
  "react-native",
26
16
  "toast"
27
17
  ],
28
- "author": "Calin Tamas <calinntamas@gmail.com>",
29
- "license": "MIT",
30
- "repository": {
31
- "type": "git",
32
- "url": "git+https://github.com/calintamas/react-native-toast-message.git"
18
+ "scripts": {
19
+ "prepare": "husky install",
20
+ "build": "rm -rf ./lib && tsc",
21
+ "prettier": "./node_modules/.bin/prettier --write",
22
+ "lint": "./node_modules/.bin/eslint --fix",
23
+ "lint-staged": "./node_modules/.bin/lint-staged",
24
+ "test": "./node_modules/.bin/jest"
33
25
  },
26
+ "author": "Calin Tamas <calintamas2@gmail.com>",
27
+ "license": "MIT",
34
28
  "devDependencies": {
35
- "@testing-library/jest-native": "^3.4.3",
36
- "@testing-library/react-native": "^7.1.0",
37
- "@types/jest": "^26.0.20",
38
- "babel-eslint": "^10.1.0",
39
- "eslint": "^7.10.0",
40
- "eslint-config-airbnb": "^18.0.1",
41
- "eslint-config-prettier": "^8.1.0",
42
- "eslint-plugin-import": "^2.20.1",
43
- "eslint-plugin-jsx-a11y": "^6.2.3",
44
- "eslint-plugin-prettier": "^3.2.0",
45
- "eslint-plugin-react": "^7.19.0",
46
- "eslint-plugin-react-hooks": "^4.0.0",
47
- "eslint-plugin-react-native-a11y": "^2.0.4",
48
- "husky": "^3.1.0",
49
- "jest": "^26.6.3",
50
- "lint-staged": "^10.2.2",
51
- "metro-react-native-babel-preset": "^0.65.0",
52
- "prettier": "2.2.1",
53
- "react-test-renderer": "^17.0.1"
29
+ "@babel/core": "^7.15.8",
30
+ "@testing-library/jest-native": "^4.0.2",
31
+ "@testing-library/react-hooks": "^7.0.2",
32
+ "@testing-library/react-native": "^8.0.0",
33
+ "@types/jest": "^27.0.1",
34
+ "@types/react-native": "^0.66.2",
35
+ "eslint-config-backpacker-react-ts": "^0.1.0",
36
+ "husky": "^7.0.2",
37
+ "import-sort-style-module": "^6.0.0",
38
+ "jest": "^27.1.1",
39
+ "lint-staged": "^11.1.2",
40
+ "metro-react-native-babel-preset": "^0.66.2",
41
+ "prettier": "^2.4.1",
42
+ "prettier-plugin-import-sort": "^0.0.7",
43
+ "react-test-renderer": "^17.0.2",
44
+ "typescript": "^4.4.3"
45
+ },
46
+ "peerDependencies": {
47
+ "react": ">=17.0.2",
48
+ "react-native": ">=0.64.2"
54
49
  },
55
- "dependencies": {
56
- "prop-types": "^15.7.2"
50
+ "importSort": {
51
+ ".js, .jsx, .ts, .tsx": {
52
+ "style": "module",
53
+ "parser": "typescript"
54
+ }
55
+ },
56
+ "lint-staged": {
57
+ "*.{js,jsx,ts,tsx,md}": "yarn prettier",
58
+ "*.{js,jsx,ts,tsx}": "yarn lint"
57
59
  }
58
60
  }
@@ -1,22 +0,0 @@
1
- name: publish
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
-
8
- jobs:
9
- publish:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: actions/checkout@v1
13
- - uses: actions/setup-node@v1
14
- with:
15
- node-version: 12
16
- - run: npm install -g yarn
17
- - name: Install dependencies
18
- run: yarn
19
- - id: publish
20
- uses: JS-DevTools/npm-publish@v1
21
- with:
22
- token: ${{ secrets.NPM_TOKEN }}
@@ -1,16 +0,0 @@
1
- name: Create Tag
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
-
8
- jobs:
9
- build:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: actions/checkout@v2
13
- - uses: Klemensas/action-autotag@stable
14
- with:
15
- GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
16
- tag_prefix: 'v'
@@ -1,44 +0,0 @@
1
- name: tests
2
-
3
- on: [push, pull_request]
4
-
5
- jobs:
6
- test:
7
- runs-on: ubuntu-latest
8
- steps:
9
- - name: Checkout
10
- uses: actions/checkout@v1
11
-
12
- - name: Setup Node.js
13
- uses: actions/setup-node@v1
14
- with:
15
- node-version: 12
16
-
17
- - name: Get yarn cache directory path
18
- id: yarn-cache-dir-path
19
- run: echo "::set-output name=dir::$(yarn cache dir)"
20
-
21
- - name: Restore yarn cache
22
- uses: actions/cache@v2
23
- id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
24
- with:
25
- path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
26
- key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27
- restore-keys: |
28
- ${{ runner.os }}-yarn-
29
-
30
- - name: Install dependencies
31
- run: yarn --prefer-offline
32
-
33
- - name: Setup React Native environment
34
- run: |
35
- yarn add react-native@0.63.4
36
- yarn add react@16.13.1
37
-
38
- - name: Run tests
39
- run: yarn test --coverage
40
-
41
- - name: Coveralls
42
- uses: coverallsapp/github-action@master
43
- with:
44
- github-token: ${{ secrets.GITHUB_TOKEN }}
package/babel.config.js DELETED
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- presets: ['module:metro-react-native-babel-preset']
3
- };
package/index.d.ts DELETED
@@ -1,67 +0,0 @@
1
- import React from 'react';
2
- import { ViewStyle, TextStyle, ImageSourcePropType } from 'react-native'
3
-
4
- declare module 'react-native-toast-message' {
5
- interface AnyObject {
6
- [key: string]: any;
7
- }
8
-
9
- export type ToastPosition = 'top' | 'bottom'
10
-
11
- export interface BaseToastProps {
12
- leadingIcon?: ImageSourcePropType,
13
- trailingIcon?: ImageSourcePropType,
14
- text1?: string,
15
- text2?: string,
16
- onPress?: () => void,
17
- onTrailingIconPress?: () => void,
18
- 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,
27
- activeOpacity?: number,
28
- text1NumberOfLines: number,
29
- text2NumberOfLines: number,
30
- }
31
- export const BaseToast: React.FC<BaseToastProps>
32
-
33
- export interface ToastProps {
34
- ref: (ref: any) => any;
35
- config?: AnyObject,
36
- style?: ViewStyle,
37
- topOffset?: number,
38
- bottomOffset?: number,
39
- keyboardOffset?: number,
40
- visibilityTime?: number,
41
- autoHide?: boolean,
42
- height?: number,
43
- position?: ToastPosition,
44
- type?: string
45
- }
46
-
47
- export default class Toast extends React.Component<ToastProps> {
48
- static show(options: {
49
- type: string,
50
- position?: ToastPosition,
51
- text1?: string,
52
- text2?: string,
53
- visibilityTime?: number,
54
- autoHide?: boolean,
55
- topOffset?: number,
56
- bottomOffset?: number,
57
- props?: AnyObject,
58
- onShow?: () => void,
59
- onHide?: () => void,
60
- onPress?: () => void
61
- }): void;
62
-
63
- static hide(): void;
64
-
65
- static setRef(ref: any): any;
66
- }
67
- }
package/index.js DELETED
@@ -1,4 +0,0 @@
1
- import Toast from './src';
2
-
3
- export { default as BaseToast } from './src/components/base';
4
- export default Toast;
package/jest.config.js DELETED
@@ -1,5 +0,0 @@
1
- module.exports = {
2
- preset: 'react-native',
3
- setupFiles: ['./jest.setup.js'],
4
- setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect']
5
- };
package/jest.setup.js DELETED
@@ -1 +0,0 @@
1
- /* eslint-env jest */
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,15 +0,0 @@
1
- /* eslint-disable global-require */
2
-
3
- const assets = {
4
- icons: {
5
- success: require('./icons/success.png'),
6
- error: require('./icons/error.png'),
7
- info: require('./icons/info.png'),
8
- close: require('./icons/close.png')
9
- }
10
- };
11
-
12
- const { icons } = assets;
13
-
14
- export { icons };
15
- export default assets;
@@ -1,10 +0,0 @@
1
- const colors = {
2
- white: '#FFF',
3
- blazeOrange: '#FE6301',
4
- mantis: '#69C779',
5
- alto: '#D8D8D8',
6
- dustyGray: '#979797',
7
- lightSkyBlue: '#87CEFA'
8
- };
9
-
10
- export default colors;
@@ -1,134 +0,0 @@
1
- import React from 'react';
2
- import { View, TouchableOpacity, Text } from 'react-native';
3
- import PropTypes from 'prop-types';
4
-
5
- import Icon from '../icon';
6
- import { icons } from '../../assets';
7
- import { stylePropType } from '../../utils/prop-types';
8
- import styles, { HEIGHT } from './styles';
9
-
10
- function BaseToast({
11
- leadingIcon,
12
- trailingIcon,
13
- text1,
14
- text2,
15
- onPress,
16
- onLeadingIconPress,
17
- onTrailingIconPress,
18
- style,
19
- leadingIconContainerStyle,
20
- trailingIconContainerStyle,
21
- leadingIconStyle,
22
- trailingIconStyle,
23
- contentContainerStyle,
24
- text1Style,
25
- text2Style,
26
- activeOpacity,
27
- text1NumberOfLines,
28
- text2NumberOfLines
29
- }) {
30
- return (
31
- <TouchableOpacity
32
- testID='rootView'
33
- style={[styles.base, styles.borderLeft, style]}
34
- onPress={onPress}
35
- activeOpacity={onPress ? activeOpacity : 1}>
36
- {leadingIcon && (
37
- <TouchableOpacity
38
- testID='leadingIcon'
39
- style={[styles.leadingIconContainer, leadingIconContainerStyle]}
40
- onPress={onLeadingIconPress}
41
- activeOpacity={onLeadingIconPress ? activeOpacity : 1}>
42
- <Icon
43
- style={{ ...styles.leadingIcon, ...leadingIconStyle }}
44
- source={leadingIcon}
45
- />
46
- </TouchableOpacity>
47
- )}
48
-
49
- <View
50
- testID='contentContainer'
51
- style={[styles.contentContainer, contentContainerStyle]}>
52
- {text1?.length > 0 && (
53
- <View>
54
- <Text
55
- testID='text1'
56
- style={[styles.text1, text1Style]}
57
- numberOfLines={text1NumberOfLines}>
58
- {text1}
59
- </Text>
60
- </View>
61
- )}
62
- {text2?.length > 0 && (
63
- <View>
64
- <Text
65
- testID='text2'
66
- style={[styles.text2, text2Style]}
67
- numberOfLines={text2NumberOfLines}>
68
- {text2}
69
- </Text>
70
- </View>
71
- )}
72
- </View>
73
-
74
- {trailingIcon && (
75
- <TouchableOpacity
76
- testID='trailingIcon'
77
- style={[styles.trailingIconContainer, trailingIconContainerStyle]}
78
- onPress={onTrailingIconPress}
79
- activeOpacity={onTrailingIconPress ? activeOpacity : 1}>
80
- <Icon
81
- style={{ ...styles.trailingIcon, ...trailingIconStyle }}
82
- source={trailingIcon}
83
- />
84
- </TouchableOpacity>
85
- )}
86
- </TouchableOpacity>
87
- );
88
- }
89
-
90
- BaseToast.HEIGHT = HEIGHT;
91
-
92
- BaseToast.propTypes = {
93
- leadingIcon: Icon.propTypes.source,
94
- trailingIcon: Icon.propTypes.source,
95
- text1: PropTypes.string,
96
- text2: PropTypes.string,
97
- onPress: PropTypes.func,
98
- onTrailingIconPress: PropTypes.func,
99
- onLeadingIconPress: PropTypes.func,
100
- style: stylePropType,
101
- leadingIconContainerStyle: stylePropType,
102
- trailingIconContainerStyle: stylePropType,
103
- leadingIconStyle: stylePropType,
104
- trailingIconStyle: stylePropType,
105
- contentContainerStyle: stylePropType,
106
- text1Style: stylePropType,
107
- text2Style: stylePropType,
108
- activeOpacity: PropTypes.number,
109
- text1NumberOfLines: PropTypes.number,
110
- text2NumberOfLines: PropTypes.number
111
- };
112
-
113
- BaseToast.defaultProps = {
114
- leadingIcon: undefined,
115
- trailingIcon: icons.close,
116
- text1: undefined,
117
- text2: undefined,
118
- onPress: undefined,
119
- onLeadingIconPress: undefined,
120
- onTrailingIconPress: undefined,
121
- style: undefined,
122
- leadingIconContainerStyle: undefined,
123
- trailingIconContainerStyle: undefined,
124
- leadingIconStyle: undefined,
125
- trailingIconStyle: undefined,
126
- contentContainerStyle: undefined,
127
- text1Style: undefined,
128
- text2Style: undefined,
129
- activeOpacity: 0.8,
130
- text1NumberOfLines: 1,
131
- text2NumberOfLines: 2
132
- };
133
-
134
- export default BaseToast;
@@ -1,54 +0,0 @@
1
- import { StyleSheet } from 'react-native';
2
- import colors from '../../colors';
3
-
4
- export const HEIGHT = 60;
5
-
6
- export default StyleSheet.create({
7
- base: {
8
- flexDirection: 'row',
9
- height: HEIGHT,
10
- width: '90%',
11
- borderRadius: 6,
12
- backgroundColor: colors.white,
13
- shadowOffset: { width: 0, height: 0 },
14
- shadowOpacity: 0.1,
15
- shadowRadius: 6,
16
- elevation: 2
17
- },
18
- borderLeft: {
19
- borderLeftWidth: 5,
20
- borderLeftColor: colors.alto
21
- },
22
- leadingIconContainer: {
23
- width: 50,
24
- justifyContent: 'center',
25
- alignItems: 'center'
26
- },
27
- contentContainer: {
28
- flex: 1,
29
- justifyContent: 'center',
30
- alignItems: 'flex-start' // in case of rtl the text will start from the right
31
- },
32
- trailingIconContainer: {
33
- width: 40,
34
- justifyContent: 'center',
35
- alignItems: 'center'
36
- },
37
- leadingIcon: {
38
- width: 20,
39
- height: 20
40
- },
41
- trailingIcon: {
42
- width: 9,
43
- height: 9
44
- },
45
- text1: {
46
- fontSize: 12,
47
- fontWeight: 'bold',
48
- marginBottom: 3
49
- },
50
- text2: {
51
- fontSize: 10,
52
- color: colors.dustyGray
53
- }
54
- });
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
-
3
- import BaseToast from './base';
4
- import { icons } from '../assets';
5
- import colors from '../colors';
6
-
7
- function ErrorToast(props) {
8
- return (
9
- <BaseToast
10
- {...props}
11
- style={{ borderLeftColor: colors.blazeOrange }}
12
- leadingIcon={icons.error}
13
- />
14
- );
15
- }
16
-
17
- ErrorToast.propTypes = BaseToast.propTypes;
18
-
19
- export default ErrorToast;
@@ -1,40 +0,0 @@
1
- import React from 'react';
2
- import { Image } from 'react-native';
3
- import PropTypes from 'prop-types';
4
-
5
- import { stylePropType } from '../../utils/prop-types';
6
- import styles from './styles';
7
-
8
- function Icon({ source, style }) {
9
- if (!source) {
10
- return null;
11
- }
12
-
13
- return (
14
- <Image
15
- testID='icon'
16
- source={source}
17
- style={[styles.base, style]}
18
- resizeMode='contain'
19
- />
20
- );
21
- }
22
-
23
- const imageSourcePropType = PropTypes.oneOfType([
24
- PropTypes.number,
25
- PropTypes.shape({
26
- uri: PropTypes.string
27
- })
28
- ]);
29
-
30
- Icon.propTypes = {
31
- source: imageSourcePropType,
32
- style: stylePropType
33
- };
34
-
35
- Icon.defaultProps = {
36
- source: undefined,
37
- style: undefined
38
- };
39
-
40
- export default Icon;
@@ -1,8 +0,0 @@
1
- import { StyleSheet } from 'react-native';
2
-
3
- export default StyleSheet.create({
4
- base: {
5
- height: 16,
6
- width: 16
7
- }
8
- });
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
-
3
- import BaseToast from './base';
4
- import { icons } from '../assets';
5
- import colors from '../colors';
6
-
7
- function InfoToast(props) {
8
- return (
9
- <BaseToast
10
- {...props}
11
- style={{ borderLeftColor: colors.lightSkyBlue }}
12
- leadingIcon={icons.info}
13
- />
14
- );
15
- }
16
-
17
- InfoToast.propTypes = BaseToast.propTypes;
18
-
19
- export default InfoToast;
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
-
3
- import BaseToast from './base';
4
- import { icons } from '../assets';
5
- import colors from '../colors';
6
-
7
- function SuccessToast(props) {
8
- return (
9
- <BaseToast
10
- {...props}
11
- style={{ borderLeftColor: colors.mantis }}
12
- leadingIcon={icons.success}
13
- />
14
- );
15
- }
16
-
17
- SuccessToast.propTypes = BaseToast.propTypes;
18
-
19
- export default SuccessToast;