Skip to main content
Version: Next

Status Card Component

It is used to indicate the status of eighter a challenge or a whole health goal. The appearance of the card varies based on the state of status it represents.

Card Type:

  • Success
  • Pending
  • Failed

Parameters:

/// - title: Title associated with the status card /// - description: description associated with the status card. /// - state:Status card state different state /// - buttonTitle: text for button /// - onButtonTap: An optional closure to execute when the button is interacted with. Default is nil.

Features

  • Update title text, description text, image icon and button

Installation

  1. Copy the StatusCard component folder into your Xcode project.

  2. Use the OCStatusCardView view in your SwiftUI code:

import SwiftUI

struct ContentView: View {
OCStatusCard(title: "Title", description: "Paragraph text goes here", state: .success, buttonTitle: "Button")
}