Atoll/DynamicIsland/components/Tabs/TabButton.swift
2025-07-13 20:26:03 +05:30

30 lines
577 B
Swift

//
// TabButton.swift
// boringNotch
//
// 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")
}
}