Skip to content

Instantly share code, notes, and snippets.

@SarahAlsharif
Created September 13, 2020 01:04
Show Gist options
  • Select an option

  • Save SarahAlsharif/502decb6d0130acbb864f563f6f192ad to your computer and use it in GitHub Desktop.

Select an option

Save SarahAlsharif/502decb6d0130acbb864f563f6f192ad to your computer and use it in GitHub Desktop.
struct Container <Content : View> : View {
var content : Content
init(@ViewBuilder content: () -> Content) {
self.content = content()
}
var body: some View {
content
.padding()
.background(Color.green)
.cornerRadius(20)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment