Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Last active July 18, 2020 19:08
Show Gist options
  • Save sturdysturge/bbb6f23dbcbea56e61615f78b76fb39a to your computer and use it in GitHub Desktop.
Save sturdysturge/bbb6f23dbcbea56e61615f78b76fb39a to your computer and use it in GitHub Desktop.
RevDoc ListItemTintView
import SwiftUI
public struct ListItemTintView: View {
public var body: some View {
NavigationView {
List {
Label(".listItemTint(.fixed(.accentColor))", systemImage: "gamecontroller")
.listItemTint(.fixed(.accentColor))
Label(".listItemTint(.fixed(Color.blue))", systemImage: "gamecontroller")
.listItemTint(.fixed(Color.blue))
Label(".listItemTint(.fixed(Color.red))", systemImage: "gamecontroller")
.listItemTint(.fixed(Color.red))
Label(".listItemTint(.monochrome)", systemImage: "gamecontroller")
.listItemTint(.monochrome)
Label(".listItemTint(.red)", systemImage: "gamecontroller")
.listItemTint(.red)
Text(".listItemTint(.fixed(.accentColor))")
.listItemTint(.fixed(.accentColor))
Text(".listItemTint(.fixed(Color.red))")
.listItemTint(.fixed(Color.red))
Text(".listItemTint(.monochrome)")
.listItemTint(.monochrome)
Text(".listItemTint(.red)")
.listItemTint(.red)
}
//Allows Sidebar on iOS and macOS
//.listStyle(SidebarListStyle())
//Content to show separate from Sidebar
Text("Content")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment