-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0668be6
commit 13d8955
Showing
10 changed files
with
205 additions
and
271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// CheckboxView.swift | ||
// Push Notify | ||
// | ||
// Created by Manh Pham on 13/10/2022. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct CheckboxView: View { | ||
|
||
let text: String | ||
@Binding var isChecked: Bool | ||
let callback: (Bool) -> Void | ||
|
||
var body: some View { | ||
HStack { | ||
Button { | ||
isChecked.toggle() | ||
callback(isChecked) | ||
} label: { | ||
Image(systemName: isChecked ? "checkmark.square" : "square") | ||
} | ||
Text(text) | ||
} | ||
} | ||
} |
Oops, something went wrong.