mirror of
https://github.com/luxwallet/ios.git
synced 2026-10-30 20:33:27 +00:00
28 lines
855 B
Swift
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,
|
|
])
|
|
}
|
|
}
|