Files
Nextcloud-Cookbook-iOS/Nextcloud Cookbook iOS Client/Views/CategoryCardView.swift
2023-09-16 14:09:49 +02:00

37 lines
964 B
Swift

//
// CategoryCardView.swift
// Nextcloud Cookbook iOS Client
//
// Created by Vincent Meilinger on 15.09.23.
//
import Foundation
import SwiftUI
struct CategoryCardView: View {
@State var category: Category
var body: some View {
ZStack {
Image("CookBook")
.aspectRatio(1, contentMode: .fit)
.overlay(
VStack {
Spacer()
Color.clear
.background(
.ultraThickMaterial
)
.overlay(
Text(category.name)
.font(.headline)
)
.frame(maxHeight: 30)
}
)
.clipShape(RoundedRectangle(cornerRadius: 10))
.padding()
}
}
}