// // KeyboardView.swift // AllenWrench // // Created by Elizabeth Cray on 1/10/25. // Copyright © 2025 Cray. All rights reserved. // // TODO: // - if touch up outside view, close Kbd import SwiftUI struct KeyboardView: View { @State var db = Database() @State var cfg = Config() var body: some View { ScrollView { VStack { ForEach(db.groups) { group in Text(group.name) .foregroundColor(cfg.highlightColor) HStack { ForEach(group.phrases) { phrase in Text(phrase.string) } } } Button("Clear") { db.groups[1].name = NSUUID().uuidString} } } } } #Preview(traits:.fixedLayout(width: 645, height: 431)) { KeyboardView() }