ActionRow.swift 521 B

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