import SwiftUI
struct KeyboardTypeModifier: ViewModifier {
let type: UserInformationType
func body(content: Content) -> some View {
Group {
switch type {
case .nickname:
content.keyboardType(.default)
case .email:
content.keyboardType(.emailAddress)
case .phoneNumber:
content.keyboardType(.numberPad)
case .mbti:
content.keyboardType(.alphabet)
case .diaryFrequency:
content.keyboardType(.numberPad)
}
}
}
}