2020-06-29 23:58:10 +02:00
|
|
|
//
|
|
|
|
// UnreadCountView.swift
|
|
|
|
// NetNewsWire
|
|
|
|
//
|
|
|
|
// Created by Maurice Parker on 6/29/20.
|
|
|
|
// Copyright © 2020 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct UnreadCountView: View {
|
|
|
|
|
|
|
|
var count: Int
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
Text(verbatim: String(count))
|
2020-07-04 03:03:36 +02:00
|
|
|
.font(.caption)
|
|
|
|
.fontWeight(.bold)
|
2020-06-29 23:58:10 +02:00
|
|
|
.padding(.horizontal, 7)
|
2020-06-30 03:09:11 +02:00
|
|
|
.padding(.vertical, 1)
|
2020-07-04 02:41:38 +02:00
|
|
|
.background(AppAssets.sidebarUnreadCountBackground)
|
|
|
|
.foregroundColor(AppAssets.sidebarUnreadCountForeground)
|
2020-06-29 23:58:10 +02:00
|
|
|
.cornerRadius(8)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct UnreadCountView_Previews: PreviewProvider {
|
|
|
|
static var previews: some View {
|
|
|
|
UnreadCountView(count: 123)
|
|
|
|
}
|
|
|
|
}
|