Skip to content

Commit

Permalink
💄 :: Designsystem / add SelectRow
Browse files Browse the repository at this point in the history
  • Loading branch information
uuuunseo committed Aug 27, 2024
1 parent 419c8b3 commit ef7acf5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
1 change: 0 additions & 1 deletion Projects/UserInterface/DesignSystem/Sources/Sources.swift

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import SwiftUI

struct SelectRow: View {
let text: String
@Binding var isSelected: Bool

var body: some View {
Button {
isSelected.toggle()
} label: {
HStack {
Text(text)

Spacer()

if isSelected {
Image(systemName: "checkmark.circle.fill")
} else {
EmptyView()
}
}
.foregroundColor(isSelected == true ? Color.ondosee(.system(.primary)) :
Color.ondosee(.system(.background))
)
}
}
}

0 comments on commit ef7acf5

Please sign in to comment.