mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Select members before creating a room (UI for selection) (#766)
* add invite users in room flow * add selectable user cell * add screenshoots * add unit test * add button style * add scroll to bottom when added user * rebase screenshot from develop * add changelog * rename invite users files * fix static viewModel * fix buttonStyle, fix unit test * UI test for selected user * remove fixed height size * fix saled width for horizontal cell * add usersSection, screenshots * use publishers pattern * add selectable form button style * add comment * improve readability * some rename on InviteUsers * fix compile issues * add search content
This commit is contained in:
@@ -20,6 +20,7 @@ import SwiftUI
|
||||
enum FormRowAccessory: View {
|
||||
case navigationLink
|
||||
case progressView
|
||||
case selection(isSelected: Bool)
|
||||
|
||||
var body: some View {
|
||||
switch self {
|
||||
@@ -29,6 +30,10 @@ enum FormRowAccessory: View {
|
||||
.foregroundColor(.element.quaternaryContent)
|
||||
case .progressView:
|
||||
ProgressView()
|
||||
case .selection(let isSelected):
|
||||
Image(systemName: isSelected ? "checkmark.circle.fill" : "circle")
|
||||
.font(.element.body)
|
||||
.foregroundColor(isSelected ? .element.primaryContent : .element.tertiaryContent)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -124,6 +129,10 @@ struct FormButtonStyles_Previews: PreviewProvider {
|
||||
Text("Hello world")
|
||||
}
|
||||
.buttonStyle(FormButtonStyle())
|
||||
Button { } label: {
|
||||
Text("Selection")
|
||||
}
|
||||
.buttonStyle(FormButtonStyle(accessory: .selection(isSelected: false)))
|
||||
}
|
||||
.formSectionStyle()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user