Created
February 8, 2021 21:57
-
-
Save sturdysturge/d813db9bc7800f88dcbb03bcd3ce053d to your computer and use it in GitHub Desktop.
This file contains 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 TickerTextView: View { | |
let ticker: Ticker | |
var body: some View { | |
Group { | |
Text(ticker.market.name) | |
Text(""" | |
\(ticker.base.rawValue) <-> \(ticker.target) | |
\(ticker.last) | |
""") | |
.font(.largeTitle) | |
.multilineTextAlignment(.center) | |
Text("Volume: \(ticker.volume)") | |
} | |
} | |
} | |
struct RefreshView: View { | |
@EnvironmentObject var dataModel: DataModel | |
var body: some View { | |
Group { | |
Button("↻ Refresh", action: dataModel.refresh) | |
Text(dataModel.lastRefreshed) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment