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

View file

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