NetNewsWire/Multiplatform/Shared/Sidebar/UnreadCountView.swift

32 lines
646 B
Swift
Raw Normal View History

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))
.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)
}
}