fix(checkout): display snackbar on top of sheet modals
This commit is contained in:
@@ -929,6 +929,7 @@ struct CardSelectionSheet: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
ZStack(alignment: .top) {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
// Header
|
// Header
|
||||||
HStack {
|
HStack {
|
||||||
@@ -1013,6 +1014,9 @@ struct CardSelectionSheet: View {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SnackbarOverlay(center: SnackbarCenter.shared)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func savedCardRow(_ card: SavedCard) -> some View {
|
private func savedCardRow(_ card: SavedCard) -> some View {
|
||||||
@@ -1133,6 +1137,7 @@ struct PaymentCardView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
ZStack(alignment: .top) {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
HStack {
|
HStack {
|
||||||
Text("Novo Cartão")
|
Text("Novo Cartão")
|
||||||
@@ -1163,6 +1168,7 @@ struct PaymentCardView: View {
|
|||||||
Text("Total do Pedido")
|
Text("Total do Pedido")
|
||||||
.font(AppTypography.caption)
|
.font(AppTypography.caption)
|
||||||
.foregroundStyle(AppColors.textMuted)
|
.foregroundStyle(AppColors.textMuted)
|
||||||
|
.textCase(nil)
|
||||||
Text(formatCurrency(context.total))
|
Text(formatCurrency(context.total))
|
||||||
.font(AppTypography.heading2)
|
.font(AppTypography.heading2)
|
||||||
.foregroundStyle(AppColors.textPrimary)
|
.foregroundStyle(AppColors.textPrimary)
|
||||||
@@ -1264,9 +1270,11 @@ struct PaymentCardView: View {
|
|||||||
}
|
}
|
||||||
.padding(20)
|
.padding(20)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.background(AppColors.backgroundLight)
|
.background(AppColors.backgroundLight)
|
||||||
} // VStack
|
|
||||||
.background(AppColors.backgroundLight)
|
SnackbarOverlay(center: SnackbarCenter.shared)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
@@ -1527,6 +1535,7 @@ struct ChangePaymentCardSheet: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
ZStack(alignment: .top) {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
HStack {
|
HStack {
|
||||||
Text("Cartão de Crédito").font(AppTypography.heading2).foregroundStyle(AppColors.textPrimary)
|
Text("Cartão de Crédito").font(AppTypography.heading2).foregroundStyle(AppColors.textPrimary)
|
||||||
@@ -1590,6 +1599,9 @@ struct ChangePaymentCardSheet: View {
|
|||||||
showNewCardForm = false; onConfirmed(orderId, shortId)
|
showNewCardForm = false; onConfirmed(orderId, shortId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SnackbarOverlay(center: SnackbarCenter.shared)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
@@ -1688,6 +1700,7 @@ struct ChangePaymentNewCardView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
|
ZStack(alignment: .top) {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
HStack {
|
HStack {
|
||||||
Text("Novo Cartão").font(AppTypography.heading2).foregroundStyle(AppColors.textPrimary)
|
Text("Novo Cartão").font(AppTypography.heading2).foregroundStyle(AppColors.textPrimary)
|
||||||
@@ -1737,6 +1750,9 @@ struct ChangePaymentNewCardView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.background(AppColors.backgroundLight)
|
.background(AppColors.backgroundLight)
|
||||||
|
|
||||||
|
SnackbarOverlay(center: SnackbarCenter.shared)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
|
|||||||
Reference in New Issue
Block a user