-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
49 lines (48 loc) · 1.27 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { NavigationContainer } from '@react-navigation/native'
import { RecoilRoot } from 'recoil'
import AppBase from './AppBase'
import { LogBox } from 'react-native'
// 운동사전 Toast Message에 사용
import Toast from 'react-native-toast-message'
import styled from 'styled-components/native'
import { colors } from './colors'
import CheckIcon from './assets/SVGs/Check.svg'
LogBox.ignoreAllLogs()
export default function App() {
return (
<RecoilRoot>
<NavigationContainer>
<AppBase />
</NavigationContainer>
<Toast config={toastConfig} />
</RecoilRoot>
)
}
const ToastBG = styled.View`
flex-direction: row;
align-items: center;
justify-content: space-between;
height: 44px;
width: 327px;
border-radius: 12px;
padding: 12px 16px;
`
const ToastText = styled.Text`
color: ${colors.white};
font-size: 13px;
font-weight: 600;
line-height: 19.5px;
font-family: Pretendard-SemiBold;
`
const toastConfig = {
customToast: ({ text1, props }) => (
<ToastBG
style={{
backgroundColor: props.isDark ? `${colors.grey_7}` : `${colors.grey_9}`,
}}
>
<ToastText>{text1}</ToastText>
<CheckIcon width={24} height={24} color={props.isDark ? `${colors.grey_7}` : `${colors.white}`} />
</ToastBG>
),
}