OCHistoryCard: UI Component
The OCHistoryCard
is a customizable card view for displaying History details.
It can include date, title, caption and pill.
The appearance of the card can be customized using different background color.
Features
- User can pass the desired details to show like date, title, caption and pill.
Installation
-
Copy the
HistoryCard
component folder into your Xcode project. -
Use the
OCHistoryCard
view in your SwiftUI code:
Parameters:
historyCardInformations
: Displaying history card details Date, title and caption.style
: Set color for History cardpillTitle
: Displaying pill on history card
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
OCHistoryCard(historyCardInformations: OCHistoryInformation(date: "03.10.2023",
title: "Title",
caption: "Caption"),
pillTitle: "New")
}.padding(16)
}
}