aboutsummaryrefslogtreecommitdiff
path: root/iosApp/iosApp/Devices/DeviceRow.swift
diff options
context:
space:
mode:
Diffstat (limited to 'iosApp/iosApp/Devices/DeviceRow.swift')
-rw-r--r--iosApp/iosApp/Devices/DeviceRow.swift11
1 files changed, 11 insertions, 0 deletions
diff --git a/iosApp/iosApp/Devices/DeviceRow.swift b/iosApp/iosApp/Devices/DeviceRow.swift
index 2c2cf3b..42ef0dc 100644
--- a/iosApp/iosApp/Devices/DeviceRow.swift
+++ b/iosApp/iosApp/Devices/DeviceRow.swift
@@ -25,6 +25,7 @@ struct DeviceRow: View {
case details
case reports
case commands
+ case close
}
var callback: (Action) -> ()
var isCell: Bool = true
@@ -98,6 +99,16 @@ struct DeviceRow: View {
/* MARK: - Device name */
Text(unit.device.name)
Spacer()
+
+ /* MARK: - Close button */
+ if !isCell {
+ Button {
+ callback(.close)
+ } label: {
+ Image(systemName: "xmark")
+ .foregroundColor(.secondary)
+ }
+ }
}
.padding(.bottom, 5.0)