diff --git a/Spottie/Views/Components/CarouselRowItem.swift b/Spottie/Views/Components/CarouselRowItem.swift index 62ae2ae..9a9a751 100644 --- a/Spottie/Views/Components/CarouselRowItem.swift +++ b/Spottie/Views/Components/CarouselRowItem.swift @@ -28,7 +28,7 @@ struct CarouselRowItem: View { .aspectRatio(1.0, contentMode: .fill) .cornerRadius(5) } - GreenPlayButton { + GreenPlayButton(width: 48) { onPlayButtonPressed() } .offset(x: -16, y: -16) diff --git a/Spottie/Views/Components/GreenPlayButton.swift b/Spottie/Views/Components/GreenPlayButton.swift index c90bf2f..5c8166c 100644 --- a/Spottie/Views/Components/GreenPlayButton.swift +++ b/Spottie/Views/Components/GreenPlayButton.swift @@ -8,6 +8,7 @@ import SwiftUI struct GreenPlayButton: View { + var width: CGFloat var onPress: () -> Void @State private var isHovering = false @@ -16,7 +17,7 @@ struct GreenPlayButton: View { Button(action: onPress) { Image(systemName: "play.circle.fill") .resizable() - .frame(width: 32, height: 32) + .frame(width: width, height: width) .foregroundColor(.green) .background(Color.white) } @@ -32,7 +33,7 @@ struct GreenPlayButton: View { struct GreenPlayButton_Previews: PreviewProvider { static var previews: some View { - GreenPlayButton { + GreenPlayButton(width: 32) { } } diff --git a/Spottie/Views/Components/ShortcutItem.swift b/Spottie/Views/Components/ShortcutItem.swift index 2015ebe..c7cf911 100644 --- a/Spottie/Views/Components/ShortcutItem.swift +++ b/Spottie/Views/Components/ShortcutItem.swift @@ -25,6 +25,7 @@ struct ShortcutItem: View { .padding(.leading) Spacer() GreenPlayButton( + width: 32, onPress: onPlayButtonPressed ) .padding(.trailing)