-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update set-as-default onboarding illustration for dark mode (#2694)
- Loading branch information
Showing
12 changed files
with
234 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
DuckDuckGo/Onboarding.xcassets/OnboardingDefaultBrowserImage.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
.../Onboarding.xcassets/OnboardingDefaultBrowserImage.imageset/Default-Browser.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-108 KB
DuckDuckGo/Onboarding.xcassets/OnboardingDefaultBrowserImage.imageset/illustration.pdf
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// | ||
// OnboardingButtonsView.swift | ||
// DuckDuckGo | ||
// | ||
// Copyright © 2024 DuckDuckGo. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import SwiftUI | ||
import DuckUI | ||
|
||
struct OnboardingActions: View { | ||
|
||
@ObservedObject var viewModel: Model | ||
|
||
var primaryAction: (() -> Void)? | ||
var secondaryAction: (() -> Void)? | ||
|
||
var body: some View { | ||
VStack(spacing: 8) { | ||
Button(action: { | ||
self.primaryAction?() | ||
}, label: { | ||
Text(viewModel.primaryButtonTitle) | ||
}) | ||
.buttonStyle(PrimaryButtonStyle()) | ||
.disabled(!viewModel.isContinueEnabled) | ||
|
||
Button(action: { | ||
self.secondaryAction?() | ||
}, label: { | ||
Text(viewModel.secondaryButtonTitle) | ||
}) | ||
.buttonStyle(GhostButtonStyle()) | ||
} | ||
} | ||
} | ||
|
||
extension OnboardingActions { | ||
class Model: ObservableObject { | ||
@Published var primaryButtonTitle = "" | ||
@Published var secondaryButtonTitle = "" | ||
@Published var isContinueEnabled = true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.