// // TabButton.swift // DynamicIsland // // Created by Hugo Persson on 2024-08-24. // import SwiftUI struct TabButton: View { let label: String let icon: String let selected: Bool let onClick: () -> Void var body: some View { Button(action: onClick) { Image(systemName: icon) .padding(.horizontal, 15) .contentShape(Capsule()) } .buttonStyle(PlainButtonStyle()) } } #Preview { TabButton(label: "Home", icon: "tray.fill", selected: true) { print("Tapped") } }