Skip to main content
Version: 12.10.0

OCEventCardView: UI Component

The OCEventCardView is a customizable card view for displaying event card details. It can include a image, title, description and a pill data.

Features

  • User can pass the desired details to show Event card details:
  • Event card data includes image, title, description and pill data (Pill data contains Title and icon image)

Parameters:

  • OCEventCard Details : image, title, description and pill data (Pill data contains Title and icon image)
  • style : The appearance of the card can be customized using different background and text color and font
import SwiftUI

struct OCEventCardTemplate: View {
var body: some View {
VStack {
let cardData = OCEventCardData(image: .local(image: Image("PlaceholderFeedCard"), title: "Title", description: "Description Text", leftPillData: EventCardPillData(title: "Label1", icon: .eventCardPin), rightPillData: EventCardPillData(title: "Label2", icon: .eventCardCalender))

OCEventCardView(cardData: cardData, onSelectCard: { cardInfo in
debugPrint("Event card \(cardInfo.title) selected")
})
}.padding(.horizontal, 16)
}
}