@momo-kits/native-kits 0.111.1-beta.2 → 0.111.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/Checkbox/Checkbox.swift +10 -10
- package/local.properties +2 -2
- package/package.json +1 -1
|
@@ -7,8 +7,8 @@ public struct Checkbox: View{
|
|
|
7
7
|
var onChange: ((Bool)->Void)?
|
|
8
8
|
var indeterminate: Bool
|
|
9
9
|
var title: String
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
|
|
11
|
+
|
|
12
12
|
public init(_ checked: Binding<Bool>,disabled: Bool = false, onChange: ( (Bool) -> Void)? = nil,
|
|
13
13
|
indeterminate: Bool = false,
|
|
14
14
|
title: String = ""){
|
|
@@ -18,12 +18,12 @@ public struct Checkbox: View{
|
|
|
18
18
|
self.indeterminate = indeterminate
|
|
19
19
|
self.title = title
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
func onCheck(){
|
|
23
23
|
checked.toggle()
|
|
24
24
|
onChange?(checked)
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
public var body: some View {
|
|
28
28
|
HStack(spacing: Spacing.S) {
|
|
29
29
|
// Checkbox
|
|
@@ -35,7 +35,7 @@ public struct Checkbox: View{
|
|
|
35
35
|
RoundedRectangle(cornerRadius: Radius.XS)
|
|
36
36
|
.stroke(borderColor, lineWidth: Spacing.XXS)
|
|
37
37
|
)
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
if checked {
|
|
40
40
|
Image(systemName: indeterminate ? "minus.square.fill" : "checkmark.square.fill")
|
|
41
41
|
.resizable()
|
|
@@ -44,13 +44,13 @@ public struct Checkbox: View{
|
|
|
44
44
|
.frame(width: 24, height: 24)
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
|
|
48
48
|
.onTapGesture {
|
|
49
49
|
if !disabled {
|
|
50
|
-
|
|
50
|
+
onCheck()
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
// Title
|
|
55
55
|
if !title.isEmpty {
|
|
56
56
|
Text(title)
|
|
@@ -58,7 +58,7 @@ public struct Checkbox: View{
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
private var borderColor: Color {
|
|
63
63
|
if disabled {
|
|
64
64
|
return Colors.black03
|
|
@@ -68,7 +68,7 @@ public struct Checkbox: View{
|
|
|
68
68
|
return Colors.text
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
|
|
71
|
+
|
|
72
72
|
private var backgroundColor: Color {
|
|
73
73
|
if disabled && checked {
|
|
74
74
|
return Colors.pink08
|
package/local.properties
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
# Location of the SDK. This is only used by Gradle.
|
|
5
5
|
# For customization when using a Version Control System, please read the
|
|
6
6
|
# header note.
|
|
7
|
-
#
|
|
8
|
-
sdk.dir=/Users/
|
|
7
|
+
#Wed Aug 21 14:20:12 ICT 2024
|
|
8
|
+
sdk.dir=/Users/huynhdung/Library/Android/sdk
|