ActionRow.swift 566 B

1234567891011121314151617181920212223242526
  1. // LoopFollow
  2. // ActionRow.swift
  3. // Created by Jonas Björkert on 2025-05-27.
  4. import SwiftUI
  5. @ViewBuilder
  6. func ActionRow(
  7. title: String,
  8. icon: String,
  9. tint: Color = .white,
  10. action: @escaping () -> Void
  11. ) -> some View {
  12. Button { action() } label: {
  13. HStack {
  14. Glyph(symbol: icon, tint: tint)
  15. Text(title)
  16. Spacer()
  17. Image(systemName: "chevron.right")
  18. .foregroundColor(Color(uiColor: .tertiaryLabel))
  19. }
  20. .contentShape(Rectangle())
  21. }
  22. .buttonStyle(.plain)
  23. }