Skip to content

Instantly share code, notes, and snippets.

@unnamedd
Last active September 11, 2023 21:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unnamedd/0331f65732184ef9bc0d9a41f4cb9709 to your computer and use it in GitHub Desktop.
Save unnamedd/0331f65732184ef9bc0d9a41f4cb9709 to your computer and use it in GitHub Desktop.
[SwiftUI] Text + Border Bottom
var body: some View {
Group {
Text(language.name)
.font(.body)
.padding([.leading, .trailing], 10)
.padding([.top, .bottom], 5)
.background(Color.gray)
.overlay(
Rectangle()
.frame(height: 4)
.foregroundColor(.blue),
alignment: .bottom
)
}
.cornerRadius(5)
.frame(height: 40)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment