Meshtastic-Apple/Meshtastic/Views/Messages/TextMessageField/TextMessageSize.swift
2024-08-29 08:40:31 -07:00

20 lines
462 B
Swift

import SwiftUI
struct TextMessageSize: View {
let maxbytes: Int
let totalBytes: Int
var body: some View {
ProgressView("\("bytes".localized): \(totalBytes) / \(maxbytes)", value: Double(totalBytes), total: Double(maxbytes))
.frame(width: 120)
.font(.caption)
.fixedSize()
.accentColor(.accentColor)
}
}
struct TextMessageSizePreview: PreviewProvider {
static var previews: some View {
TextMessageSize(maxbytes: 228, totalBytes: 100)
}
}