diff --git a/Features/WalletConnector/Sources/WalletConnector/ViewModels/ConnectionProposalViewModel.swift b/Features/WalletConnector/Sources/WalletConnector/ViewModels/ConnectionProposalViewModel.swift index c536fb5f3..a917c911c 100644 --- a/Features/WalletConnector/Sources/WalletConnector/ViewModels/ConnectionProposalViewModel.swift +++ b/Features/WalletConnector/Sources/WalletConnector/ViewModels/ConnectionProposalViewModel.swift @@ -91,16 +91,11 @@ public struct ConnectionProposalViewModel { [ ListItemModel( title: Localized.WalletConnect.Permissions.viewBalance, - imageStyle: .accessory(assetImage: .image(Images.System.checkmark)) + imageStyle: .accessory(assetImage: .image(Images.System.checkmark), fontWeight: .semibold) ), ListItemModel( title: Localized.WalletConnect.Permissions.approvalRequests, - imageStyle: .accessory(assetImage: .image(Images.System.checkmark)) - ), - ListItemModel( - title: Localized.WalletConnect.Permissions.moveFunds, - titleStyle: TextStyle(font: .body, color: Colors.secondaryText), - imageStyle: .accessory(assetImage: .image(Images.System.xmark), foregroundColor: Colors.gray) + imageStyle: .accessory(assetImage: .image(Images.System.checkmark), fontWeight: .semibold) ), ] } diff --git a/Packages/Components/Sources/AssetImageView.swift b/Packages/Components/Sources/AssetImageView.swift index 34f09b5aa..ccee66f03 100644 --- a/Packages/Components/Sources/AssetImageView.swift +++ b/Packages/Components/Sources/AssetImageView.swift @@ -43,6 +43,9 @@ public struct AssetImageView: View { ) .frame(width: size, height: size) .cornerRadius(cornerRadius) + .ifLet(style?.fontWeight) { view, weight in + view.fontWeight(weight) + } .ifLet(style?.foregroundColor) { view, color in view.foregroundStyle(color) } @@ -110,13 +113,16 @@ extension AssetImageView { public struct Style: Sendable, Equatable { public let foregroundColor: Color? public let cornerRadius: CGFloat? + public let fontWeight: Font.Weight? public init( foregroundColor: Color? = nil, - cornerRadius: CGFloat? = nil + cornerRadius: CGFloat? = nil, + fontWeight: Font.Weight? = nil ) { self.foregroundColor = foregroundColor self.cornerRadius = cornerRadius + self.fontWeight = fontWeight } } } diff --git a/Packages/Components/Sources/Lists/ListItemView.swift b/Packages/Components/Sources/Lists/ListItemView.swift index 4c4bada97..993ee2fda 100644 --- a/Packages/Components/Sources/Lists/ListItemView.swift +++ b/Packages/Components/Sources/Lists/ListItemView.swift @@ -88,7 +88,7 @@ public struct ListItemView: View { AssetImageView( assetImage: imageStyle.assetImage, size: imageStyle.imageSize, - style: .init(foregroundColor: imageStyle.foregroundColor, cornerRadius: imageStyle.cornerRadius) + style: .init(foregroundColor: imageStyle.foregroundColor, cornerRadius: imageStyle.cornerRadius, fontWeight: imageStyle.fontWeight) ) } HStack { diff --git a/Packages/Components/Sources/Types/ListItemImageStyle.swift b/Packages/Components/Sources/Types/ListItemImageStyle.swift index 3121a2a61..a025aec6b 100644 --- a/Packages/Components/Sources/Types/ListItemImageStyle.swift +++ b/Packages/Components/Sources/Types/ListItemImageStyle.swift @@ -9,6 +9,7 @@ public struct ListItemImageStyle: Sendable { public let imageSize: CGFloat public let alignment: VerticalAlignment public let foregroundColor: Color? + public let fontWeight: Font.Weight? private let cornerRadiusType: CornerRadiusType public var cornerRadius: CGFloat { @@ -24,6 +25,7 @@ public struct ListItemImageStyle: Sendable { imageSize: CGFloat, alignment: VerticalAlignment = .center, foregroundColor: Color? = nil, + fontWeight: Font.Weight? = nil, cornerRadiusType: CornerRadiusType ) { guard let assetImage else { return nil } @@ -32,6 +34,7 @@ public struct ListItemImageStyle: Sendable { self.cornerRadiusType = cornerRadiusType self.alignment = alignment self.foregroundColor = foregroundColor + self.fontWeight = fontWeight } public enum CornerRadiusType: Sendable { @@ -58,11 +61,12 @@ public extension ListItemImageStyle { ) } - static func accessory(assetImage: AssetImage?, foregroundColor: Color? = nil) -> Self? { + static func accessory(assetImage: AssetImage?, foregroundColor: Color? = nil, fontWeight: Font.Weight? = nil) -> Self? { ListItemImageStyle( assetImage: assetImage, imageSize: .space12, foregroundColor: foregroundColor, + fontWeight: fontWeight, cornerRadiusType: .none ) }