Code: Select all
import SwiftUI
struct ContentView: View {
var body: some View {
Button {
} label: {
VStack(alignment: .leading, spacing: 6) {
Text("Some Information")
.font(.headline)
Text("Other")
.font(.footnote)
}
.padding()
.padding(.top, 8)
}
.overlay {
RoundedRectangle(cornerRadius: 12)
.stroke(Color(uiColor: .systemGreen), lineWidth: 4)
}
.overlay(alignment: .topTrailing) {
Text("CALL OUT")
.font(.footnote)
.foregroundStyle(.white)
.padding(.vertical, 6)
.padding(.horizontal, 12)
.background {
RoundedRectangle(cornerRadius: 12)
.fill(Color(uiColor: .systemGreen))
}
}
}
}
#Preview {
ContentView()
}