diff --git a/Sources/Bedrock/Views/Settings/SETTINGS_GUIDE.md b/Sources/Bedrock/Views/Settings/SETTINGS_GUIDE.md index 68e401f..0c7146a 100644 --- a/Sources/Bedrock/Views/Settings/SETTINGS_GUIDE.md +++ b/Sources/Bedrock/Views/Settings/SETTINGS_GUIDE.md @@ -493,13 +493,14 @@ SettingsNavigationRow( A reusable view for displaying open source licenses used in your app. -**Step 1: Define licenses in your app** +**Create an app-specific wrapper view with licenses** ```swift +import SwiftUI import Bedrock -extension License { - static let appLicenses: [License] = [ +struct AppLicensesView: View { + private static let licenses: [License] = [ License( name: "MijickCamera", url: "https://github.com/Mijick/Camera", @@ -513,16 +514,10 @@ extension License { description: "In-app subscriptions made easy." ) ] -} -``` - -**Step 2: Create app-specific wrapper view** - -```swift -struct AppLicensesView: View { + var body: some View { LicensesView( - licenses: License.appLicenses, + licenses: Self.licenses, backgroundColor: AppSurface.overlay, cardBackgroundColor: AppSurface.card, cardBorderColor: AppBorder.subtle, @@ -532,7 +527,7 @@ struct AppLicensesView: View { } ``` -**Step 3: Navigate to it from settings** +**Navigate to it from settings** ```swift SettingsNavigationRow(