diff --git a/Sources/Showcase/FormPlayground.swift b/Sources/Showcase/FormPlayground.swift index ba33fb5..531c969 100644 --- a/Sources/Showcase/FormPlayground.swift +++ b/Sources/Showcase/FormPlayground.swift @@ -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") } diff --git a/Sources/Showcase/LabeledContentPlayground.swift b/Sources/Showcase/LabeledContentPlayground.swift new file mode 100644 index 0000000..4af4cab --- /dev/null +++ b/Sources/Showcase/LabeledContentPlayground.swift @@ -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) + } + .padding() + } + .toolbar { + PlaygroundSourceLink(file: "LabeledContentPlayground.swift") + } + } +} + diff --git a/Sources/Showcase/PlaygroundListView.swift b/Sources/Showcase/PlaygroundListView.swift index 1fe2789..96380ba 100644 --- a/Sources/Showcase/PlaygroundListView.swift +++ b/Sources/Showcase/PlaygroundListView.swift @@ -37,6 +37,7 @@ enum PlaygroundType: CaseIterable, View { case keyboard case keychain case label + case labeledContent case link case list case localization @@ -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: @@ -345,6 +348,8 @@ enum PlaygroundType: CaseIterable, View { KeychainPlayground() case .label: LabelPlayground() + case .labeledContent: + LabeledContentPlayground() case .link: LinkPlayground() case .list: diff --git a/Sources/Showcase/Resources/Localizable.xcstrings b/Sources/Showcase/Resources/Localizable.xcstrings index 92cd8c9..2c093fd 100644 --- a/Sources/Showcase/Resources/Localizable.xcstrings +++ b/Sources/Showcase/Resources/Localizable.xcstrings @@ -1217,6 +1217,9 @@ }, "Date only" : { + }, + "Date Picker" : { + }, "DatePicker" : { @@ -1920,6 +1923,21 @@ }, "Label Styles" : { + }, + "Labeled Button" : { + + }, + "Labeled Content" : { + + }, + "Labeled Date Picker" : { + + }, + "Labeled Image" : { + + }, + "Labeled Value" : { + }, "Large circle" : {