mirror of
https://github.com/yattee/yattee.git
synced 2026-02-20 01:39:46 +00:00
Yattee v2 rewrite
This commit is contained in:
24
Yattee/Views/Components/DurationBadge.swift
Normal file
24
Yattee/Views/Components/DurationBadge.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// DurationBadge.swift
|
||||
// Yattee
|
||||
//
|
||||
// Reusable duration/time badge for video thumbnails.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
/// A badge displaying duration or time remaining on video thumbnails.
|
||||
struct DurationBadge: View {
|
||||
let text: String
|
||||
|
||||
var body: some View {
|
||||
Text(text)
|
||||
.font(.caption2.monospacedDigit())
|
||||
.fontWeight(.medium)
|
||||
.padding(.horizontal, 4)
|
||||
.padding(.vertical, 2)
|
||||
.background(.black.opacity(0.75))
|
||||
.foregroundStyle(.white)
|
||||
.clipShape(RoundedRectangle(cornerRadius: 4))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user