AcaMate_iOS/AcaMate/1. View/10. Common/101. Button/BoxBtnView.swift
2025-02-14 17:51:08 +09:00

35 lines
583 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
}
}
}
#Preview {
BoxBtnView(width: 40, height: 40, action: nil){
VStack {
Text("Test1")
Text("Test2")
}
}
}