initial commit
This commit is contained in:
36
Nextcloud Cookbook iOS Client/Views/CategoryCardView.swift
Normal file
36
Nextcloud Cookbook iOS Client/Views/CategoryCardView.swift
Normal file
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// 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()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user