mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-26 09:01:56 +01:00
33 lines
940 B
Swift
33 lines
940 B
Swift
|
import SwiftUI
|
||
|
|
||
|
@available(iOS 15.0, *)
|
||
|
struct CompactPriceView: View {
|
||
|
let price: String
|
||
|
let lastUpdated: String
|
||
|
let currencySymbol: String
|
||
|
let dataSource: String
|
||
|
|
||
|
var body: some View {
|
||
|
VStack(alignment: .center, spacing: 16) {
|
||
|
Text(price)
|
||
|
.font(.title)
|
||
|
.bold()
|
||
|
.multilineTextAlignment(.center)
|
||
|
.dynamicTypeSize(.large ... .accessibility5)
|
||
|
.accessibilityLabel("Bitcoin price: \(price)")
|
||
|
|
||
|
VStack(alignment: .center, spacing: 4) {
|
||
|
Text("\(currencySymbol)")
|
||
|
Text("\(lastUpdated)")
|
||
|
Text("\(dataSource)")
|
||
|
}
|
||
|
.font(.subheadline)
|
||
|
.foregroundColor(.secondary)
|
||
|
.multilineTextAlignment(.center)
|
||
|
.accessibilityElement(children: .combine)
|
||
|
}
|
||
|
.padding()
|
||
|
.frame(maxWidth: .infinity)
|
||
|
}
|
||
|
}
|