fix an issue when input showing error message the layout would change

This commit is contained in:
ryanzhao 2023-08-23 15:15:33 +10:00
parent f6bf61f1b3
commit f5e086dee1
1 changed files with 11 additions and 5 deletions

View File

@ -56,11 +56,17 @@ public struct SessionTextField: View {
.stroke(themeColor: (error?.isEmpty == false) ? .danger : .borderSeparator)
)
Text(error ?? " ")
.bold()
.font(.system(size: Values.mediumFontSize))
.foregroundColor(themeColor: .danger)
.multilineTextAlignment(.center)
ZStack {
Text(error ?? "")
.bold()
.font(.system(size: Values.mediumFontSize))
.foregroundColor(themeColor: .danger)
.multilineTextAlignment(.center)
}
.frame(
height: 50,
alignment: .top
)
}
}
}