Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // VIEW COMPOSITION
- struct CapsuleText: View {
- var text: String
- var body: some View {
- Text(text)
- .font(.largeTitle)
- .padding()
- .foregroundColor(.white)
- .background(Color.blue)
- .clipShape(Capsule())
- }
- }
- struct ViewComposition: View {
- var body: some View {
- CapsuleText(text: "Greg")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment