Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Created January 26, 2021 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sturdysturge/186d61f1c94df319e4521acaa353ffbf to your computer and use it in GitHub Desktop.
Save sturdysturge/186d61f1c94df319e4521acaa353ffbf to your computer and use it in GitHub Desktop.
struct AquaFinderTopControls: View {
@State var viewModeIndex = 0
var body: some View {
HStack {
AquaSegmentedControlView(buttons: [
(text: "◀︎", action: {}, selected: false),
(text: "▶︎", action: {}, selected: false)
])
AquaSegmentedControlView(buttons: [
(text: "⊞", action: { viewModeIndex = 0 }, selected: viewModeIndex == 0),
(text: "≣", action: { viewModeIndex = 1 }, selected: viewModeIndex == 1),
(text: "◫", action: { viewModeIndex = 2 }, selected: viewModeIndex == 2),
])
AquaSegmentedControlView(buttons: [
(text: "⚙︎▾", action: {}, selected: false)
])
Spacer()
.frame(maxWidth: .infinity)
AquaSearchFieldView(leftLabelText: "", placeholderText: "local disks")
}
.frame(height: 30)
.padding(.leading, 20)
.padding(.top, 30)
.padding(.bottom, 10)
.padding(.horizontal, 5)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment