| | |
| | | let isEditing: Bool |
| | | let placement: BubblePlacement |
| | | let arrowOffset: CGFloat |
| | | let noteQuotaText: String? |
| | | let noteQuotaWarning: Bool |
| | | @Binding var draftNote: String |
| | | var noteFocused: FocusState<Bool>.Binding |
| | | let onCommit: () -> Void |
| | |
| | | Text("\(draftNote.count) / \(TagDatabase.maxAppNoteLength)") |
| | | .font(.system(size: 10, weight: .medium)) |
| | | .foregroundStyle(.white.opacity(0.35)) |
| | | |
| | | if let noteQuotaText, !noteQuotaText.isEmpty { |
| | | Text(noteQuotaText) |
| | | .font(.system(size: 11, weight: .medium)) |
| | | .foregroundStyle( |
| | | noteQuotaWarning |
| | | ? Color.orange.opacity(0.96) |
| | | : Color.white.opacity(0.58) |
| | | ) |
| | | .multilineTextAlignment(.trailing) |
| | | .fixedSize(horizontal: false, vertical: true) |
| | | } |
| | | } |
| | | } else if !displayNote.isEmpty { |
| | | Text(displayNote) |