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 0435cb45f6 - Show all commits

View file

@ -71,13 +71,14 @@ enum ButtonVariant {
}
enum ButtonSize {
case small, medium, large
case small, medium, large, icon
var padding: EdgeInsets {
switch self {
case .small: return EdgeInsets(top: 8, leading: 12, bottom: 8, trailing: 12)
case .medium: return EdgeInsets(top: 10, leading: 16, bottom: 10, trailing: 16)
case .large: return EdgeInsets(top: 12, leading: 20, bottom: 12, trailing: 20)
case .icon: return EdgeInsets(top: 10, leading: 10, bottom: 10, trailing: 10)
}
}
@ -86,6 +87,7 @@ enum ButtonSize {
case .small: return .caption
case .medium: return .body
case .large: return .title3
case .icon: return .body
}
}
@ -94,6 +96,7 @@ enum ButtonSize {
case .small: return 6
case .medium: return 8
case .large: return 10
case .icon: return 8
}
}
}
@ -125,5 +128,12 @@ enum ButtonSize {
action: {}
)
PwdButton(
label: Image(systemName: "plus"),
variant: .primary,
size: .icon,
action: {}
)
}.padding()
}