Caps-iOS/Caps/Views/CapNameEntryView.swift

32 lines
865 B
Swift
Raw Permalink Normal View History

2022-06-10 21:20:49 +02:00
import SwiftUI
import SFSafeSymbols
struct CapNameEntryView: View {
@Binding
var name: String
var body: some View {
TextField("Name", text: $name, prompt: Text("Enter name..."))
.padding(7)
.padding(.horizontal, 25)
.background(Color(.systemGray5))
.cornerRadius(8)
.overlay(
HStack {
Image(systemSymbol: .squareAndPencil)
.foregroundColor(.gray)
.frame(minWidth: 0, maxWidth: .infinity, alignment: .leading)
.padding(.leading, 8)
}
)
}
}
struct CapNameEntryView_Previews: PreviewProvider {
static var previews: some View {
CapNameEntryView(name: .constant(""))
.previewLayout(.fixed(width: 375, height: 50))
}
}