Skip to content

Commit

Permalink
Fix to button tap area by placing rectangle within Button
Browse files Browse the repository at this point in the history
  • Loading branch information
levieggertcru committed Nov 7, 2024
1 parent e08bb89 commit a629db4
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ struct ReviewShareShareableView: View {

private let maxPreviewImageSize: CGFloat = 250
private let bottomSpacing: CGFloat = 50
private let shareButtonSize: CGSize = CGSize(width: 200, height: 60)

@ObservedObject private var viewModel: ReviewShareShareableViewModel

Expand Down Expand Up @@ -50,15 +51,21 @@ struct ReviewShareShareableView: View {
viewModel.shareImageTapped()
}) {

HStack(alignment: .center, spacing: 8) {
Image(ImageCatalog.toolSettingsShareImageButtonIcon.name)
Text(viewModel.shareImageButtonTitle)
.foregroundColor(.white)
ZStack {

Rectangle()
.fill(ColorPalette.gtBlue.color)
.frame(width: shareButtonSize.width, height: shareButtonSize.height)
.cornerRadius(6)

HStack(alignment: .center, spacing: 8) {
Image(ImageCatalog.toolSettingsShareImageButtonIcon.name)
Text(viewModel.shareImageButtonTitle)
.foregroundColor(.white)
}
}
}
.frame(width: 200, height: 50, alignment: .center)
.background(ColorPalette.gtBlue.color)
.cornerRadius(6)
.frame(width: shareButtonSize.width, height: shareButtonSize.height, alignment: .center)
}
.frame(width: geometry.size.width)
.padding(EdgeInsets(top: 0, leading: 0, bottom: bottomSpacing, trailing: 0))
Expand Down

0 comments on commit a629db4

Please sign in to comment.