Skip to content

Commit

Permalink
ItemListErrorCardView: replace frame max width with modifier to fit w…
Browse files Browse the repository at this point in the history
…idth to content.
  • Loading branch information
jaclync committed Feb 25, 2025
1 parent 4687e68 commit e8f0665
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct ItemListErrorCardView: View {
.font(Constants.itemTitleFont)
}
.buttonStyle(POSOutlinedButtonStyle(size: .normal))
.frame(maxWidth: Constants.accessoryButtonMaxWidth * scale)
.fixedSize(horizontal: true, vertical: false)
.padding(Constants.accessoryButtonPadding * (1 / scale))
}
.frame(maxWidth: .infinity, idealHeight: Constants.productCardSize * scale)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ enum PointOfSaleItemListCardConstants {
static let verticalTextPadding: CGFloat = POSPadding.small
static let itemTitleFont: POSFontStyle = .posBodyLargeBold
static let itemDetailFont: POSFontStyle = .posBodyLargeRegular()
static let accessoryButtonMaxWidth: CGFloat = 136
static let accessoryButtonPadding: CGFloat = POSPadding.medium
static let backgroundColor: Color = .posSurfaceContainerLowest
static let titleColor: Color = .posOnSurface
Expand Down

0 comments on commit e8f0665

Please sign in to comment.