diff options
Diffstat (limited to 'Hotline/Views/AgreementView.swift')
| -rw-r--r-- | Hotline/Views/AgreementView.swift | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Hotline/Views/AgreementView.swift b/Hotline/Views/AgreementView.swift new file mode 100644 index 0000000..c61c9d7 --- /dev/null +++ b/Hotline/Views/AgreementView.swift @@ -0,0 +1,35 @@ +import SwiftUI + +struct AgreementView: View { + @Environment(\.dismiss) var dismiss + + let text: String + + var body: some View { + VStack(alignment: .leading) { + ScrollView { + VStack(alignment: .leading) { + Text(text) + .fontDesign(.monospaced) + .padding() + .dynamicTypeSize(.small) + .textSelection(.enabled) + } + } + Button("OK") { + print("DONE") + } + .bold() + .padding(EdgeInsets(top: 16, leading: 24, bottom: 16, trailing: 24)) + .frame(maxWidth: .infinity) + } + } +} + +#Preview { + AgreementView(text: """ +Welcome! + +Take it on real one. +""") +} |