Skip to content

Commit

Permalink
ui tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-dydx committed Jun 17, 2024
1 parent b9bd080 commit de39f47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ public class dydxPortfolioPendingPositionsItemViewModel: PlatformViewModel {
}

private var divider: some View {
Spacer(minLength: 1)
Rectangle()
.frame(height: 1)
.overlay(ThemeColor.SemanticColor.borderDefault.color)
}

private var bottomContent: some View {
let viewOrdersStringKey: String
let viewOrdersStringParams: [String: String]?
if orderCount > 1 {
if orderCount == 1 {
viewOrdersStringKey = "APP.GENERAL.VIEW_ORDER"
viewOrdersStringParams = nil
} else {
Expand All @@ -102,12 +103,14 @@ public class dydxPortfolioPendingPositionsItemViewModel: PlatformViewModel {
PlatformView(viewModel: self, parentStyle: parentStyle, styleKey: styleKey) { [weak self] _ in
guard let self = self else { return AnyView(PlatformView.nilView) }

let horizontalPadding: CGFloat = 12
return VStack(spacing: 0) {
self.topContent
self.divider
.padding(.horizontal, -horizontalPadding)
self.bottomContent
}
.padding(.horizontal, 12)
.padding(.horizontal, horizontalPadding)
.themeColor(background: .layer3)
.clipShape(.rect(cornerRadius: 10))
.wrappedInAnyView()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ public class dydxPortfolioPositionsViewModel: PlatformViewModel {
.fixedSize()
Text("\(pendingPositionItems.count)")
.frame(width: 28, height: 28)
.themeColor(background: .layer6)
.themeColor(background: .layer3)
.themeColor(foreground: .textSecondary)
.borderAndClip(style: .circle, borderColor: .borderDefault)
Spacer()
}
Expand Down

0 comments on commit de39f47

Please sign in to comment.