Skip to content

Commit

Permalink
[fix] #157 상태에 따른 배경, border 색 잘못나오는 문제 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ShapeKim98 committed Dec 2, 2024
1 parent 87bdb49 commit 317067b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Projects/DSKit/Sources/Modifiers/PokitInputModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@ struct PokitInputModifier: ViewModifier {
}

func body(content: Content) -> some View {
let backgroundColor = state == .active ? .pokit(.bg(.base)) : self.state.backgroundColor
let backgroundStrokeColor = state == .active ? .pokit(.border(.brand)) : self.state.backgroundStrokeColor

content
.background {
RoundedRectangle(cornerRadius: shape.radius, style: .continuous)
.fill(backgroundColor)
.fill(self.state.backgroundColor)
.overlay {
RoundedRectangle(cornerRadius: shape.radius, style: .continuous)
.stroke(backgroundStrokeColor, lineWidth: 1)
.stroke(self.state.backgroundStrokeColor, lineWidth: 1)
}
}
.animation(.pokitDissolve, value: state)
Expand Down

0 comments on commit 317067b

Please sign in to comment.