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 ca240988b8 - Show all commits

View file

@ -17,21 +17,19 @@ struct PwdButton<Label: View>: View {
var action: () -> Void
var body: some View {
HStack {
Button(action: action) {
label
}
.padding(size.padding)
.background(variant.backgroundColor(colorScheme))
.foregroundColor(variant.foregroundColor(colorScheme))
.font(size.font)
.cornerRadius(size.cornerRadius)
.overlay(
RoundedRectangle(cornerRadius: size.cornerRadius)
.stroke(variant.borderColor(colorScheme), lineWidth: variant.borderWidth)
)
.onTapGesture {
action()
}
.buttonStyle(PlainButtonStyle())
.padding(size.padding)
.background(variant.backgroundColor(colorScheme))
.foregroundColor(variant.foregroundColor(colorScheme))
.font(size.font)
.cornerRadius(size.cornerRadius)
.overlay(
RoundedRectangle(cornerRadius: size.cornerRadius)
.stroke(variant.borderColor(colorScheme), lineWidth: variant.borderWidth)
)
}
}