Skip to content

Commit

Permalink
Merge pull request #12 from IanKeen/patch-1
Browse files Browse the repository at this point in the history
Add missing `@ViewBuilder`
  • Loading branch information
dkk committed Oct 26, 2021
2 parents 90867f1 + 81e2ec7 commit 3cc84e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/WrappingHStack/WrappingHStack.swift
Expand Up @@ -93,7 +93,7 @@ public extension WrappingHStack {
/// `.dynamicIncludingBorders` to fill the full width with equal spacing
/// between items and from the items to the border.
/// - content: The content and behavior of the view.
init<Data: RandomAccessCollection, Content: View>(_ data: Data, id: KeyPath<Data.Element, Data.Element> = \.self, alignment: HorizontalAlignment = .leading, spacing: Spacing = .constant(8), content: @escaping (Data.Element) -> Content) {
init<Data: RandomAccessCollection, Content: View>(_ data: Data, id: KeyPath<Data.Element, Data.Element> = \.self, alignment: HorizontalAlignment = .leading, spacing: Spacing = .constant(8), @ViewBuilder content: @escaping (Data.Element) -> Content) {
self.spacing = spacing
self.alignment = alignment
self.items = data.map { Self.viewType(from: content($0[keyPath: id])) }
Expand Down

0 comments on commit 3cc84e7

Please sign in to comment.