//
//  LiveRoomOverlayStrokeImageButton.swift
//  SodaLive
//
//  Created by klaus on 2024/01/17.
//

import SwiftUI

struct LiveRoomOverlayStrokeImageButton: View {
    
    let imageName: String
    let strokeColor: Color
    let strokeWidth: CGFloat
    let strokeCornerRadius: CGFloat
    
    let onClick: () -> Void
    
    var body: some View {
        Image(imageName)
        .padding(4)
        .overlay(
            RoundedRectangle(cornerRadius: strokeCornerRadius)
                .stroke(
                    strokeColor,
                    lineWidth: strokeWidth
                )
        )
        .onTapGesture { onClick() }
    }
}

struct LiveRoomOverlayStrokeImageButton_Previews: PreviewProvider {
    static var previews: some View {
        LiveRoomOverlayStrokeImageButton(
            imageName: "ic_edit",
            strokeColor: Color.graybb,
            strokeWidth: 1,
            strokeCornerRadius: 5.3,
            onClick: {}
        )
    }
}
