mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-25 19:10:49 +02:00
Style info view
This commit is contained in:
@@ -21,6 +21,8 @@ struct InfoView: View {
|
||||
let text: String
|
||||
let action: () -> Void
|
||||
}
|
||||
|
||||
@Environment(\.theme) var theme: ThemeSwiftUI
|
||||
private let title: String
|
||||
private let description: String
|
||||
private let action: Action
|
||||
@@ -32,15 +34,30 @@ struct InfoView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 24) {
|
||||
VStack(spacing: 16) {
|
||||
Text(title)
|
||||
Text(description)
|
||||
}
|
||||
|
||||
Button(action: action.action) {
|
||||
Text(action.text)
|
||||
GeometryReader { proxy in
|
||||
VStack(alignment: .leading, spacing: 24) {
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
Text(title)
|
||||
.font(theme.fonts.title1B)
|
||||
.foregroundColor(theme.colors.primaryContent)
|
||||
|
||||
Text(description)
|
||||
.font(theme.fonts.body)
|
||||
.foregroundColor(theme.colors.primaryContent)
|
||||
}
|
||||
|
||||
Button(action: action.action) {
|
||||
Text(action.text)
|
||||
.font(theme.fonts.bodySB)
|
||||
.foregroundColor(theme.colors.background)
|
||||
}
|
||||
.frame(height: 48)
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(theme.colors.accent)
|
||||
.cornerRadius(8)
|
||||
}
|
||||
.padding(24)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user