Skip to content

Instantly share code, notes, and snippets.

@andreweades
Created September 28, 2021 20:27
Show Gist options
  • Save andreweades/780e8fa8b759c07cf515531018d5e71e to your computer and use it in GitHub Desktop.
Save andreweades/780e8fa8b759c07cf515531018d5e71e to your computer and use it in GitHub Desktop.
Make a disclosure indicator out of a chevron
//
// ContentView.swift
// CaseyDisclosureButton
//
// Created by Andrew Eades on 28/09/2021.
//
import SwiftUI
struct ContentView: View {
var body: some View {
List {
HStack {
Button("Send Feedback") { //action
}
.buttonStyle(.plain)
Spacer()
Image(systemName: "chevron.right")
.foregroundColor(Color("SoftGray")) // E2E2E3
.font(.system(size: 13, weight: .bold, design: .rounded))
}
ZStack(alignment: .leading) {
Button("Send Feedback") { //action
}
.buttonStyle(.plain)
NavigationLink("", destination: EmptyView())
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment