We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f699761 + 3611b89 commit 0c04566Copy full SHA for 0c04566
Anytype/Sources/PresentationLayer/Common/SwiftUI/CounterView.swift
@@ -7,17 +7,17 @@ enum CounterViewStyle {
7
}
8
9
struct CounterView: View {
10
-
11
- let count: Int
+
+ let text: String
12
let style: CounterViewStyle
13
14
init(count: Int, style: CounterViewStyle = .default) {
15
- self.count = count
+ self.text = count > 999 ? "999+" : "\(count)"
16
self.style = style
17
18
19
var body: some View {
20
- Text("\(count)")
+ Text(text)
21
.anytypeFontStyle(.caption1Regular) // Without line height multiple
22
.foregroundStyle(Color.Control.white)
23
.frame(height: 20)
0 commit comments