Skip to content

Commit

Permalink
Fix label bundle bug
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsaidi committed Apr 25, 2024
1 parent e4408a9 commit f55cc06
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 8 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ SwiftUIKit makes its best effort to honor semver, but breaking changes can occur



## 4.2.2

### 🐛 Bug fixes

* `View+Label` now correctly applies the provided bundle.



## 4.2.1

### 💡 Behavior changes
Expand Down
7 changes: 2 additions & 5 deletions Sources/SwiftUIKit/Extensions/View+Label.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@ public extension View {
bundle: Bundle? = nil
) -> some View {
Label {
Text(text)
Text(text, bundle: bundle)
} icon: {
self
}
}

/// Convert the view to a localized label.
///
/// - Parameters:
/// - text: The label text.
@available(*, deprecated, renamed: "label(_:bundle:)")
func localizedLabel(
_ text: LocalizedStringKey,
bundle: Bundle? = nil
Expand Down

0 comments on commit f55cc06

Please sign in to comment.