Skip to content

Instantly share code, notes, and snippets.

@SarahAlsharif
Created October 4, 2022 12:04
Show Gist options
  • Save SarahAlsharif/fdb264204ac220224bbcda005a972301 to your computer and use it in GitHub Desktop.
Save SarahAlsharif/fdb264204ac220224bbcda005a972301 to your computer and use it in GitHub Desktop.
struct ExtraStepContent: View {
let index : Int
let color : Color
let extraContent : [String]
let extraContentSize : CGSize?
var body: some View {
ZStack {
if let extra = extraContent[index] {
if UIImage(systemName: extra) != nil {
Image(systemName: extra)
} else {
Text(extra)
}
}
}
.foregroundColor(color)
.frame(width: extraContentSize?.width, height: extraContentSize?.height)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment