OCIllustrationCard: UI Component
The OCIllustrationCard component is a reusable IllustrationCard that allows you to create customizable IllustrationCard by setting with image type, title, description and button.
Features
- Create IllustrationCard.
- Customize image type, title, description and button.
Installation
-
Copy the
IllustrationCardcomponent folder into your Xcode project. -
Use the
OCIllustrationCardview in your SwiftUI code:
Parameters:
imageType: Display image with different type like Local and URL.title: Title of Illustration carddescription: Description of Illustration cardbuttonText: Display button in Illustration cardstyle: The appearance of the card can be customized using different background and text color
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
OCIllustrationCard(imageType: .local(image: Image("OnboardCardViewPlaceholder"),
title: "Title",
description: "Description",
buttonText: "Button",
style: .blue)
}.padding()
}
}