PWD-1: add custom UI style #5

Merged
MarkusThielker merged 14 commits from 1-implement-custom-ui into development 2025-01-24 12:45:09 +00:00
Showing only changes of commit 63d2c9e6eb - Show all commits

View file

@ -11,12 +11,18 @@ struct PwdTextFieldStyle: TextFieldStyle {
@Environment(\.colorScheme) var colorScheme
private let radius: CGFloat = 12
func _body(configuration: TextField<Self._Label>) -> some View {
configuration
.padding(EdgeInsets(top: 8, leading: 8, bottom: 8, trailing: 8))
.background(colorScheme == .dark ? .black : .white)
.foregroundColor(colorScheme == .dark ? .white : .black)
.textFieldStyle(.plain)
.cornerRadius(12)
.cornerRadius(radius)
.overlay(
RoundedRectangle(cornerRadius: radius)
.stroke(.gray, lineWidth: 1)
)
}
}