Skip to content

Commit

Permalink
[Improvement] Custom Color 추가 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
solchan87 authored Dec 23, 2022
1 parent a4a8d07 commit 337af34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/BezierSwift/Foundation/Color/SemanticColor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public enum SemanticColor {
case bgtxtNavyLight
case bgtxtNavyNormal
case bgtxtNavyDark
case custom(PaletteSet)
}

// MARK: Light, Dark Color
Expand All @@ -148,7 +149,9 @@ extension SemanticColor {

// MARK: Palette Set
extension SemanticColor {
private var paletteSet: (Color, Color) {
public typealias PaletteSet = (Color, Color)

private var paletteSet: PaletteSet {
switch self {
// MARK: - Background
case .bgWhiteHigh: return (Palette.white, Palette.grey700)
Expand Down Expand Up @@ -280,6 +283,7 @@ extension SemanticColor {
case .bgtxtNavyLight: return (Palette.navy400_30, Palette.navy300_40)
case .bgtxtNavyNormal: return (Palette.navy400, Palette.navy300)
case .bgtxtNavyDark: return (Palette.navy500, Palette.navy400)
case .custom(let paletteSet): return (paletteSet.0, paletteSet.1)
}
}
}

0 comments on commit 337af34

Please sign in to comment.