mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
32 lines
467 B
Swift
32 lines
467 B
Swift
// Copyright 2021 Yandex LLC. All rights reserved.
|
|
|
|
import BaseUI
|
|
|
|
@frozen
|
|
public enum Theme: String {
|
|
case dark
|
|
case light
|
|
}
|
|
|
|
extension Theme {
|
|
public var userInterfaceStyle: UserInterfaceStyle {
|
|
switch self {
|
|
case .light:
|
|
return .light
|
|
case .dark:
|
|
return .dark
|
|
}
|
|
}
|
|
}
|
|
|
|
extension UserInterfaceStyle {
|
|
public var theme: Theme {
|
|
switch self {
|
|
case .light:
|
|
return .light
|
|
case .dark:
|
|
return .dark
|
|
}
|
|
}
|
|
}
|