Skip to content

Commit

Permalink
[#254] dark mode color 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
chongin12 committed Dec 26, 2023
1 parent 3cb76ff commit e07a602
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions YDS-SwiftUI/Source/Foundation/YDSSemanticColor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@
//
import SwiftUI

public enum YDSColor {
public struct YDSColor {
private static func color(light: Color, dark: Color? = nil) -> Color {
if let dark = dark {
if UITraitCollection.current.userInterfaceStyle == .dark {
return dark
} else {
return light
}
return Color(uiColor: UIColor { $0.userInterfaceStyle == .dark ? UIColor(dark) : UIColor(light) })
} else {
return light
}
Expand Down

0 comments on commit e07a602

Please sign in to comment.