forked from AcaMate/AcaMate_iOS
27 lines
500 B
Swift
27 lines
500 B
Swift
//
|
|
// Alert.swift
|
|
// AcaMate
|
|
//
|
|
// Created by Sean Kim on 12/2/24.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct AlertData {
|
|
var title: String
|
|
var body: String
|
|
var button: [ButtonType]
|
|
|
|
init(title: String = "알림", body: String, button: [ButtonType] = [.init(name: "확인", role: .none, function: nil)]) {
|
|
self.title = title
|
|
self.body = body
|
|
self.button = button
|
|
}
|
|
}
|
|
|
|
struct ButtonType {
|
|
var name: String
|
|
var role: ButtonRole?
|
|
var function: (()->())?
|
|
}
|