mirror of
https://github.com/maxgoedjen/secretive.git
synced 2025-04-10 17:47:19 +00:00
Cleanup
This commit is contained in:
parent
7b3809d296
commit
0df1efb28b
@ -74,27 +74,29 @@ struct ThumbnailPickerView<ValueType: Hashable>: View {
|
|||||||
_selection = selection
|
_selection = selection
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
HStack(alignment: .top) {
|
HStack(alignment: .top) {
|
||||||
ForEach(items) { item in
|
ForEach(items) { item in
|
||||||
VStack(alignment: .leading, spacing: 5) {
|
VStack(alignment: .leading, spacing: 5) {
|
||||||
item.thumbnail
|
item.thumbnail
|
||||||
.frame(width: 250, height: 200)
|
.frame(height: 200)
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 10, style: .continuous))
|
|
||||||
.overlay(RoundedRectangle(cornerRadius: 10)
|
.overlay(RoundedRectangle(cornerRadius: 10)
|
||||||
.stroke(lineWidth: item.value == selection ? 5 : 0))
|
.stroke(lineWidth: item.value == selection ? 15 : 0))
|
||||||
|
.clipShape(RoundedRectangle(cornerRadius: 10, style: .continuous))
|
||||||
.foregroundColor(.accentColor)
|
.foregroundColor(.accentColor)
|
||||||
Text(item.name)
|
Text(item.name)
|
||||||
.bold()
|
.bold()
|
||||||
Text(item.description).frame(width: 250)
|
Text(item.description)
|
||||||
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
}
|
}
|
||||||
|
.frame(width: 250)
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
withAnimation(.spring()) {
|
withAnimation(.spring()) {
|
||||||
selection = item.value
|
selection = item.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.padding(5)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user