Files
ios/Unstoppable/Widget/SingleCoinPriceWidget.swift
2026-05-08 12:00:05 +06:00

28 lines
855 B
Swift

import Foundation
import SwiftUI
import WidgetKit
struct SingleCoinPriceWidget: Widget {
var body: some WidgetConfiguration {
IntentConfiguration(
kind: AppWidgetConstants.singleCoinPriceWidgetKind,
intent: SingleCoinPriceIntent.self,
provider: SingleCoinPriceProvider()
) { entry in
if #available(iOS 17.0, *) {
SingleCoinPriceView(entry: entry)
.containerBackground(.fill.tertiary, for: .widget)
} else {
SingleCoinPriceView(entry: entry)
.background()
}
}
.contentMarginsDisabled()
.configurationDisplayName("single_coin_price.title")
.description("single_coin_price.description")
.supportedFamilies([
.systemSmall,
])
}
}