23 lines
659 B
Swift
23 lines
659 B
Swift
import SwiftUI
|
|
|
|
struct CardContainerModifier: ViewModifier {
|
|
func body(content: Content) -> some View {
|
|
content
|
|
.padding(.horizontal, 20)
|
|
.padding(.vertical, 24)
|
|
.background(Color(.systemBackground).opacity(0.8))
|
|
.clipShape(RoundedRectangle(cornerRadius: 28, style: .continuous))
|
|
.overlay(
|
|
RoundedRectangle(cornerRadius: 28, style: .continuous)
|
|
.stroke(Color.primary.opacity(0.06), lineWidth: 1)
|
|
)
|
|
.padding(16)
|
|
}
|
|
}
|
|
|
|
extension View {
|
|
func cardContainer() -> some View {
|
|
modifier(CardContainerModifier())
|
|
}
|
|
}
|