AcaMate_iOS/AcaMate/1. View/12. Main/121. Button/BoxBtnView.swift
2025-02-04 18:03:47 +09:00

40 lines
754 B
Swift

//
// BoxBtnView.swift
// AcaMate
//
// Created by TAnine on 2/4/25.
//
import SwiftUI
struct BoxBtnView<Content: View>: View {
let width: CGFloat
let height: CGFloat
let action: VOID_TO_VOID?
@ViewBuilder let content: Content
var body: some View {
Button{
guard let action = action else { return }
action()
} label: {
content
// if let image = image {
// image
// .resizable()
// .frame(width: width, height: height)
// }
}
}
}
#Preview {
BoxBtnView(width: 40, height: 40, action: nil){
VStack {
Text("Test1")
Text("Test2")
}
}
}