Meshtastic-Apple/MeshtasticClient/Views/Helpers/CircleText.swift

26 lines
610 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
See LICENSE folder for this samples licensing information.
Abstract:
A view that clips an image to a circle and adds a stroke and shadow.
*/
import SwiftUI
struct CircleText: View {
var text: String
var body: some View {
Text(text).font(.subheadline).foregroundColor(.white)
.background(Circle()
.fill(Color.blue)
.frame(width: 40, height: 40, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/))
}
}
struct CircleText_Previews: PreviewProvider {
static var previews: some View {
CircleText(text: "RDN")
}
}