Compound Room Details (#1369)

This commit is contained in:
Doug
2023-07-21 14:22:09 +01:00
committed by GitHub
parent 3b0961f3c5
commit fbe05a8679
11 changed files with 91 additions and 59 deletions
@@ -152,15 +152,21 @@ struct FormButtonStyles_Previews: PreviewProvider {
}
.buttonStyle(FormButtonStyle())
Button { } label: {
Label("Block user", systemImage: "circle.slash")
}
.buttonStyle(FormButtonStyle(accessory: .progressView))
.disabled(true)
Button { } label: {
Label("Show something", systemImage: "rectangle.portrait")
}
.buttonStyle(FormButtonStyle(accessory: .navigationLink))
Button(role: .destructive) { } label: {
Label("Show destruction", systemImage: "rectangle.portrait")
Label("Destroy", systemImage: "trash")
}
.buttonStyle(FormButtonStyle(accessory: .navigationLink))
.buttonStyle(FormButtonStyle())
ShareLink(item: "test")
.buttonStyle(FormButtonStyle())
@@ -54,19 +54,21 @@ struct AvatarHeaderView<Footer: View>: View {
struct HeaderView_Previews: PreviewProvider {
static var previews: some View {
AvatarHeaderView(avatarUrl: URL.picturesDirectory,
name: "Test",
id: "test",
avatarSize: .room(on: .details),
imageProvider: MockMediaProvider(),
subtitle: "test") {
HStack(spacing: 32) {
ShareLink(item: "test") {
Image(systemName: "square.and.arrow.up")
Form {
AvatarHeaderView(avatarUrl: URL.picturesDirectory,
name: "Test Room",
id: "test",
avatarSize: .room(on: .details),
imageProvider: MockMediaProvider(),
subtitle: "#test:matrix.org") {
HStack(spacing: 32) {
ShareLink(item: "test") {
Image(systemName: "square.and.arrow.up")
}
.buttonStyle(FormActionButtonStyle(title: "Test"))
}
.buttonStyle(FormActionButtonStyle(title: "Test"))
.padding(.top, 32)
}
.padding(.top, 32)
}
}
}