Files
Gas-Tank-AR-App/GasTankAR/Views/Leads/Overview/LeadCardFlightView.swift

24 lines
747 B
Swift

import SwiftUI
struct LeadCardFlight {
let lead: Lead
}
/// The moving copy lives above the List so row layout and clipping cannot interrupt its path.
struct LeadCardFlightView: View {
let lead: Lead
let showsBookmark: Bool
var body: some View {
var unbookmarkedLead = lead
unbookmarkedLead.isBookmarked = false
return ZStack(alignment: .top) {
LeadCardView(lead: unbookmarkedLead, isBusy: false, onOpen: {}, onBookmark: {})
.opacity(showsBookmark ? 0 : 1)
BookmarkedLeadCardView(lead: lead, isBusy: false, onOpen: {}, onBookmark: {})
.opacity(showsBookmark ? 1 : 0)
}
.shadow(color: .black.opacity(0.12), radius: 14, y: 8)
}
}