Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Sources/Showcase/FormPlayground.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ struct FormPlayground: View {
.tint(.red)
Label("Label .listItemTint(.red)", systemImage: "star.fill")
.listItemTint(.red)
LabeledContent("Labeled Value", value: "Value")
LabeledContent("Labeled Image") {
Image(systemName: "star.fill")
}
LabeledContent("Labeled Date Picker") {
DatePicker("Date Picker", selection: $dateValue)
.labelsHidden()
}
LabeledContent("Labeled Button") {
Button("Button") {}
}
LabeledContent("Labeled Content") {
Label("Label", systemImage: "star.fill")
}
NavigationLink(value: "Test") {
Label("Label in NavigationLink", systemImage: "star.fill")
}
Expand Down
20 changes: 20 additions & 0 deletions Sources/Showcase/LabeledContentPlayground.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2023–2025 Skip
import SwiftUI

struct LabeledContentPlayground: View {
var body: some View {
ScrollView {
VStack(spacing: 16) {
LabeledContent("Label", value: "Value")

// Not implemented, yet: Text does not support value:, format:. This would make a good improvement.
// LabeledContent("Label", value: 12, format: IntegerFormatStyle.number)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment that this is unsupported currently, but would make for a good future improvement.

}
.padding()
}
.toolbar {
PlaygroundSourceLink(file: "LabeledContentPlayground.swift")
}
}
}

5 changes: 5 additions & 0 deletions Sources/Showcase/PlaygroundListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ enum PlaygroundType: CaseIterable, View {
case keyboard
case keychain
case label
case labeledContent
case link
case list
case localization
Expand Down Expand Up @@ -166,6 +167,8 @@ enum PlaygroundType: CaseIterable, View {
return LocalizedStringResource("Link")
case .label:
return LocalizedStringResource("Label")
case .labeledContent:
return LocalizedStringResource("Labeled Content")
case .list:
return LocalizedStringResource("List")
case .localization:
Expand Down Expand Up @@ -345,6 +348,8 @@ enum PlaygroundType: CaseIterable, View {
KeychainPlayground()
case .label:
LabelPlayground()
case .labeledContent:
LabeledContentPlayground()
case .link:
LinkPlayground()
case .list:
Expand Down
18 changes: 18 additions & 0 deletions Sources/Showcase/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,9 @@
},
"Date only" : {

},
"Date Picker" : {

},
"DatePicker" : {

Expand Down Expand Up @@ -1920,6 +1923,21 @@
},
"Label Styles" : {

},
"Labeled Button" : {

},
"Labeled Content" : {

},
"Labeled Date Picker" : {

},
"Labeled Image" : {

},
"Labeled Value" : {

},
"Large circle" : {

Expand Down
Loading