// SPDX-License-Identifier: MIT // Copyright (c) 2026 Oscar Canton and SwiftUI Blocks contributors import SwiftUI /// A heart that pops and throws out a burst of small particles when liked. /// /// With Reduce Motion on, the heart simply fills, with no pop or burst. struct LikeBurstButton: View { @Binding var isLiked: Bool var color: Color = .pink var particleCount: Int = 12 @State private var burstCount = 0 @ScaledMetric(relativeTo: .largeTitle) private var heartSize = 72.0 @Environment(\.accessibilityReduceMotion) private var reduceMotion var body: some View { Button { isLiked.toggle() if isLiked && !reduceMotion { burstCount += 1 } } label: { ZStack { ForEach(0..