22 lines
562 B
Swift
22 lines
562 B
Swift
import SwiftUI
|
|
|
|
struct PrimaryPillButton: View {
|
|
let title: String
|
|
let action: () -> Void
|
|
|
|
var body: some View {
|
|
Button(action: action) {
|
|
Text(title)
|
|
.font(.headline)
|
|
.foregroundStyle(.white)
|
|
.frame(maxWidth: .infinity)
|
|
.padding(.vertical, 16)
|
|
.contentShape(Rectangle())
|
|
}
|
|
.background(Color.black)
|
|
.clipShape(Capsule())
|
|
.shadow(color: .black.opacity(0.28), radius: 18, y: 8)
|
|
.accessibilityLabel(title)
|
|
}
|
|
}
|