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 27, 2023
1 parent d3d1a98 commit 87b3fd5
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 87b3fd5

Please sign in to comment.