improved the text editors (replaced em with textfields)
This commit is contained in:
parent
c49db28ff6
commit
d4b1226ef3
@ -19,11 +19,13 @@ struct CardsView: View {
|
||||
|
||||
var body: some View {
|
||||
List {
|
||||
Section {
|
||||
TextEditor(text: $newCardText)
|
||||
} header: {
|
||||
Text("Add new card")
|
||||
}
|
||||
// Section {
|
||||
// TextEditor(text: $newCardText)
|
||||
// } header: {
|
||||
// Text("Add new card")
|
||||
// }
|
||||
TextField("Add New Card", text: $newCardText, axis: .vertical)
|
||||
.lineLimit(.max)
|
||||
Section {
|
||||
ForEach(project.sortedCards) { card in
|
||||
Text(card.content)
|
||||
@ -38,6 +40,7 @@ struct CardsView: View {
|
||||
}
|
||||
|
||||
}
|
||||
.scrollDismissesKeyboard(.immediately)
|
||||
.navigationTitle(project.name)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar {
|
||||
|
@ -16,8 +16,10 @@ struct EditCardView: View {
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
Form {
|
||||
TextEditor(text: $text)
|
||||
.frame(minHeight: 100)
|
||||
// TextEditor(text: $text)
|
||||
// .foregroundStyle(.secondary)
|
||||
TextField("Edit Card Text", text: $text, axis: .vertical)
|
||||
.lineLimit(.max)
|
||||
}
|
||||
.navigationTitle("Edit Card")
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
@ -38,6 +40,6 @@ struct EditCardView: View {
|
||||
}
|
||||
|
||||
#Preview {
|
||||
@State var test = ""
|
||||
@State var test = "PreviewData.project.cards[4].con\ntentblabla\nksbdlaskdlaksd\naklsdbal\nkbsdal\nkbsdlasbd\nsdkfnsdlkfm"
|
||||
return EditCardView(text: $test) { _ in }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user