@@ -11,41 +11,13 @@ import {
1111 type ImageStyle ,
1212} from 'react-native' ;
1313import type { NotifierComponentProps } from '../types' ;
14-
15- type Types =
16- | 'error'
17- | 'warn'
18- | 'info'
19- | 'success'
20- | 'connected'
21- | 'disconnected' ;
22-
23- const iconColors : Record < Types , string > = {
24- warn : '#FD9F02' ,
25- error : '#F34F4E' ,
26- info : '#3150EC' ,
27- success : '#24BF60' ,
28- connected : '#24BF60' ,
29- disconnected : '#CCCCCC' ,
30- } ;
31-
32- const backgroundColors : Record < Types , string > = {
33- warn : '#FFF6E5' ,
34- error : '#FFF2F2' ,
35- info : '#F3F3FF' ,
36- success : '#E7F8F0' ,
37- connected : '#E7F8F0' ,
38- disconnected : '#F2F2F2' ,
39- } ;
40-
41- const icons : Record < Types , ImageSourcePropType > = {
42- warn : require ( './icons/warn.png' ) ,
43- error : require ( './icons/error.png' ) ,
44- success : require ( './icons/success.png' ) ,
45- info : require ( './icons/info.png' ) ,
46- connected : require ( './icons/connected.png' ) ,
47- disconnected : require ( './icons/disconnected.png' ) ,
48- } ;
14+ import {
15+ backgroundColors ,
16+ commonStyles ,
17+ iconColors ,
18+ icons ,
19+ type Types ,
20+ } from './common' ;
4921
5022const s = StyleSheet . create ( {
5123 container : {
@@ -61,16 +33,6 @@ const s = StyleSheet.create({
6133 flexDirection : 'row' ,
6234 alignItems : 'center' ,
6335 gap : 8 ,
64-
65- shadowColor : '#000000' ,
66- shadowOffset : {
67- width : 0 ,
68- height : 2 ,
69- } ,
70- shadowOpacity : 0.25 ,
71- shadowRadius : 4 ,
72-
73- elevation : 10 ,
7436 } ,
7537 contentContainerNoIcon : {
7638 paddingLeft : 20 ,
@@ -193,6 +155,7 @@ export const ToastComponent = ({
193155 < View
194156 style = { [
195157 s . contentContainer ,
158+ commonStyles . shadow ,
196159 ! type && ! iconSource && s . contentContainerNoIcon ,
197160 contentContainerStyle ,
198161 ] }
0 commit comments