Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Last active January 11, 2021 17:03
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/d9cab00379e1f42d2a7ec75f5cc4c902 to your computer and use it in GitHub Desktop.
Save sturdysturge/d9cab00379e1f42d2a7ec75f5cc4c902 to your computer and use it in GitHub Desktop.
struct MoveButton: View {
let action: () -> Void
init(_ action: @escaping () -> Void) {
self.action = action
}
var body: some View {
Group {
Button("Move") {
action()
}
.foregroundColor(.black)
.padding(15)
.background(Color.white)
.cornerRadius(10)
.padding(.bottom, 50)
}
.frame(maxWidth: .infinity,
maxHeight: .infinity,
alignment: .bottom)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment