mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
30 lines
577 B
Swift
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")
|
|
}
|
|
}
|