Skip to content

Commit

Permalink
chore: In app ratings modal and profile picture picture sheet UI impr…
Browse files Browse the repository at this point in the history
…ovements (#94)
  • Loading branch information
saeedbashir authored Nov 15, 2024
1 parent 2463666 commit 2cb5828
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 16 deletions.
42 changes: 29 additions & 13 deletions Core/Core/View/Base/AppReview/Elements/AppReviewButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,42 @@ struct AppReviewButton: View {
}

var body: some View {
Button(action: {
if isActive { action() }
}, label: {
Group {
HStack(spacing: 4) {
Text(type == .submit ? CoreLocalization.Review.Button.submit
: (type == .shareFeedback ? CoreLocalization.Review.Button.shareFeedback : CoreLocalization.Review.Button.rateUs ))
.foregroundColor(isActive ? Color.white : Color.black.opacity(0.6))
Button(
action: {
if isActive { action() }
},
label: {
Group {
HStack(spacing: 4) {
Text(
type == .submit
? CoreLocalization.Review.Button.submit
: type == .shareFeedback
? CoreLocalization.Review.Button.shareFeedback
: CoreLocalization.Review.Button.rateUs
)
.foregroundColor(isActive ? Theme.Colors.primaryButtonTextColor : Color.black.opacity(0.6))
.font(Theme.Fonts.labelLarge)
.padding(3)

}.padding(.horizontal, 20)
.padding(.vertical, 9)
}.fixedSize()
.background(isActive
? Theme.Colors.accentColor
: Theme.Colors.cardViewStroke)
.background(
Theme.Shapes.buttonShape
.fill(
isActive ? Theme.Colors.accentColor
: Theme.Colors.cardViewStroke
)
)
.accessibilityElement(children: .ignore)
.accessibilityLabel(type == .submit ? CoreLocalization.Review.Button.submit
: (type == .shareFeedback ? CoreLocalization.Review.Button.shareFeedback : CoreLocalization.Review.Button.rateUs ))
.accessibilityLabel(
type == .submit
? CoreLocalization.Review.Button.submit
: type == .shareFeedback
? CoreLocalization.Review.Button.shareFeedback
: CoreLocalization.Review.Button.rateUs
)
.cornerRadius(8)
})
}
Expand Down
13 changes: 10 additions & 3 deletions Profile/Profile/Presentation/EditProfile/ProfileBottomSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,16 @@ struct ProfileBottomSheet: View {
.fill(type.bgColor())
)
.overlay(
RoundedRectangle(cornerRadius: 8)
.stroke(style: .init(lineWidth: 1, lineCap: .round, lineJoin: .round, miterLimit: 1))
.foregroundColor(type.frameColor())
Theme.Shapes.buttonShape
.stroke(style: .init(
lineWidth: 1,
lineCap: .round,
lineJoin: .round,
miterLimit: 1)
)
.foregroundColor(
type.frameColor()
)
)
}
}
Expand Down

0 comments on commit 2cb5828

Please sign in to comment.