-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoginView.swift
More file actions
49 lines (44 loc) · 1.73 KB
/
Copy pathLoginView.swift
File metadata and controls
49 lines (44 loc) · 1.73 KB
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
//
// LoginView.swift
// DevLog
//
// Created by opfic on 12/30/24.
//
import SwiftUI
struct LoginView: View {
@StateObject var viewModel: LoginViewModel
@Environment(\.colorScheme) var colorScheme
@Environment(\.sceneWidth) var sceneWidth
var body: some View {
ZStack {
VStack {
Spacer()
Image("Primary")
.resizable()
.scaledToFit()
.frame(width: sceneWidth / 5)
Spacer()
VStack(spacing: 20) {
LoginButton(logo: Image("Google"), text: "구글 계정으로 로그인") {
viewModel.send(.tapSignInButton(.google))
}
.frame(width: sceneWidth * 3 / 4, height: sceneWidth / 10)
LoginButton(logo: Image("Github"), text: "깃헙 계정으로 로그인") {
viewModel.send(.tapSignInButton(.github))
}
.frame(width: sceneWidth * 3 / 4, height: sceneWidth / 10)
LoginButton(logo: Image("Apple"), text: "애플 계정으로 로그인") {
viewModel.send(.tapSignInButton(.apple))
}
.frame(width: sceneWidth * 3 / 4, height: sceneWidth / 10)
}
.padding(.bottom, 30)
Text("로그인하면 사용 약관 및 개인 정보 취급 방침에 동의하게 됩니다.")
.font(.caption2)
.foregroundStyle(Color.gray)
.multilineTextAlignment(.center)
.padding(.vertical)
}
}
}
}