IceCubesApp/Packages/Explore/Sources/Explore/CardsListView.swift
2024-01-06 19:27:26 +01:00

30 lines
658 B
Swift

import DesignSystem
import Models
import StatusKit
import SwiftUI
public struct CardsListView: View {
@Environment(Theme.self) private var theme
let cards: [Card]
public init(cards: [Card]) {
self.cards = cards
}
public var body: some View {
List {
ForEach(cards) { card in
StatusRowCardView(card: card)
.listRowBackground(theme.primaryBackgroundColor)
.padding(.vertical, 8)
}
}
.scrollContentBackground(.hidden)
.background(theme.primaryBackgroundColor)
.listStyle(.plain)
.navigationTitle("explore.section.trending.links")
.navigationBarTitleDisplayMode(.inline)
}
}