Atoll/DynamicIsland/components/Tabs/TabButton.swift
Hariharan Mudaliar 13a2ff0e20 Working
2025-07-13 22:16:02 +05:30

30 lines
579 B
Swift

//
// 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")
}
}