Files
Nextcloud-Cookbook-iOS/Nextcloud Cookbook iOS Client/Views/CategoryCardView.swift
2023-10-03 12:11:32 +02:00

33 lines
793 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-category")
.resizable()
.scaledToFit()
.overlay(
VStack {
Spacer()
Text(category.name == "*" ? "Other" : category.name)
.font(.headline)
.lineLimit(2)
.foregroundStyle(.white)
.padding()
}
)
.padding()
}
}
}