Here's my code.
HStack {
List {
ForEach(friends, id:\.self) { row in
Button(action: { isDetail.toggle() }, label: {
Image(row.photo)
.resizable()
.aspectRatio(contentMode: ContentMode.fit)
.frame(width: 80, height: 80)
.clipped()
.clipShape(Circle())
})
}
}
}
.frame(height: 400)
if isDetail {
AccessibleMindsHalfModalView(isShown: $isDetail, modalHeight: 400, content: {
Text("Hello")
})
}
HStack {
List {
ForEach(friends, id:\.self) { row in
Button(action: { isDetail.toggle() }, label: {
Image(row.photo)
.resizable()
.aspectRatio(contentMode: ContentMode.fit)
.frame(width: 80, height: 80)
.clipped()
.clipShape(Circle())
})
}
}
}
.frame(height: 400)
if isDetail {
AccessibleMindsHalfModalView(isShown: $isDetail, modalHeight: 400, content: {
Text("Hello")
})
}