29 lines
471 B
Swift
29 lines
471 B
Swift
//
|
|
// AddItemButton.swift
|
|
// WorkoutsPlus
|
|
//
|
|
// Created by Felix Förtsch on 29.08.24.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct AddItemButton: View {
|
|
var label: String
|
|
var action: () -> Void
|
|
|
|
var body: some View {
|
|
Button(action: action) {
|
|
HStack {
|
|
Image(systemName: "plus.circle.fill")
|
|
.foregroundStyle(.green)
|
|
Text(label)
|
|
.foregroundStyle(.blue)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
AddItemButton(label: "Add Item", action: {})
|
|
}
|