OCGoalsOverviewCardView: UI Component
The OCGoalsOverviewCardView
is a customizable card view for displaying Goals overview card details.
It can include a image, bubble, title and a pill view.
Features
- User can pass the desired details to show GoalsOverview card details:
- GoalsOverview card data includes image, title, pill image, pill text and bubble title.
Parameters:
GoalsOverviewCard Details
: image, title, pill image, pill textand bubble title.style
: The appearance of the card can be customized using different background and text color and font
import SwiftUI
struct OCGoalsOverviewCardTemplate: View {
var body: some View {
VStack {
let cardData = OCGoalsOverviewCardData(image: .local(image: Image("PlaceholderFeedCard"), title: "GoalsOverview card title", pillImage: Image.moneyPigIcon, pillText: "Label", bubbleTitle: "Beta")
OCGoalsOverviewCardView(cardData: cardData, onSelectCard: { cardInfo in
debugPrint("GoalsOverview card \(cardInfo.title) selected")
})
}.padding(.horizontal, 16)
}
}