This repository has been archived by the owner on May 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Transaction Details v2 UI
- Loading branch information
1 parent
4635cec
commit bde11ad
Showing
27 changed files
with
883 additions
and
202 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...t/Assets.xcassets/Brave Wallet/Transaction States/tx-details-lines.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "tx_details_lines.svg", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
.../Brave Wallet/Transaction States/tx-details-lines.imageset/tx_details_lines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
This file was deleted.
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
61 changes: 61 additions & 0 deletions
61
Sources/BraveWallet/Crypto/Portfolio/WalletIconButton.swift
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,61 @@ | ||
/* Copyright 2023 The Brave Authors. All rights reserved. | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
import SwiftUI | ||
import DesignSystem | ||
|
||
struct WalletIconButton: View { | ||
|
||
enum IconSymbol { | ||
case braveSystemName(String) | ||
case systemName(String) | ||
} | ||
|
||
let iconSymbol: IconSymbol | ||
let action: () -> Void | ||
|
||
@ScaledMetric var length: CGFloat = 36 | ||
|
||
init( | ||
braveSystemName: String, | ||
action: @escaping () -> Void, | ||
length: CGFloat = 36 | ||
) { | ||
self.iconSymbol = .braveSystemName(braveSystemName) | ||
self.action = action | ||
self._length = .init(wrappedValue: length) | ||
} | ||
|
||
init( | ||
systemName: String, | ||
action: @escaping () -> Void, | ||
length: CGFloat = 36 | ||
) { | ||
self.iconSymbol = .systemName(systemName) | ||
self.action = action | ||
self._length = .init(wrappedValue: length) | ||
} | ||
|
||
var body: some View { | ||
Button(action: action) { | ||
Group { | ||
switch iconSymbol { | ||
case .braveSystemName(let braveSystemName): | ||
Image(braveSystemName: braveSystemName) | ||
case .systemName(let systemName): | ||
Image(systemName: systemName) | ||
} | ||
} | ||
.foregroundColor(Color(braveSystemName: .iconInteractive)) | ||
.imageScale(.medium) | ||
.padding(6) | ||
.frame(width: length, height: length) | ||
.background( | ||
Circle() | ||
.strokeBorder(Color(braveSystemName: .dividerInteractive), lineWidth: 1) | ||
) | ||
} | ||
} | ||
} |
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
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
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
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.