diff --git a/Sources/Showcase/ListPlayground.swift b/Sources/Showcase/ListPlayground.swift index ac97545..bcbf2fd 100644 --- a/Sources/Showcase/ListPlayground.swift +++ b/Sources/Showcase/ListPlayground.swift @@ -21,6 +21,7 @@ enum ListPlaygroundType: String, CaseIterable { case plainStyleSectionedEditActions case onMoveDelete case positioned + case topContent var title: String { switch self { @@ -62,6 +63,8 @@ enum ListPlaygroundType: String, CaseIterable { return ".onMove, .onDelete" case .positioned: return "Positioned" + case .topContent: + return "Top content" } } } @@ -135,6 +138,10 @@ struct ListPlayground: View { case .positioned: PositionedListPlayground() .navigationTitle($0.title) + case .topContent: + ListWithTopContentPlayground() + .navigationTitle($0.title) + } } } @@ -693,3 +700,28 @@ struct PositionedListPlayground: View { } } } + +struct ListWithTopContentPlayground: View { + var body: some View { + List { + HStack(spacing: 0) { + + VStack { + Text("left text") + .frame(maxWidth: .infinity) + } + + VStack { + Text("right text") + .frame(maxWidth: .infinity) + } + } + + Section { + ForEach(0..<30, id: \.self) { index in + Text("Row \(index)") + } + } + } + } +} diff --git a/Sources/Showcase/Resources/Localizable.xcstrings b/Sources/Showcase/Resources/Localizable.xcstrings index 531bf01..a608f6d 100644 --- a/Sources/Showcase/Resources/Localizable.xcstrings +++ b/Sources/Showcase/Resources/Localizable.xcstrings @@ -1692,6 +1692,10 @@ }, "LazyVStack.%@" : { + }, + "left text" : { + "comment" : "A label displayed on the left side of a horizontal stack view in the playground.", + "isCommentAutoGenerated" : true }, "Light" : { @@ -2215,6 +2219,10 @@ }, "RGB" : { + }, + "right text" : { + "comment" : "A label displayed below a vertical stack view.", + "isCommentAutoGenerated" : true }, "Rotate" : {