Created
October 4, 2022 12:04
-
-
Save SarahAlsharif/fdb264204ac220224bbcda005a972301 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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