retain order of the exercises during persistence process
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// 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: {})
|
||||
}
|
||||
Reference in New Issue
Block a user