// // This file is part of Canvas. // Copyright (C) 2026-present Instructure, Inc. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . // import SwiftUI public extension Image.iui { struct Storybook: View { public init() {} public var body: some View { ScrollView { LazyVGrid( columns: [GridItem(.adaptive(minimum: 60), alignment: .top)], alignment: .leading, spacing: 16 ) { ForEach(Image.iui.all, id: \.name) { entry in VStack(spacing: 4) { entry.image .resizable() .aspectRatio(contentMode: .fit) .frame(width: 24, height: 24) Text(entry.name) } } } .padding(.all, 16) } .font(.system(size: 10)) .multilineTextAlignment(.center) .frame(maxHeight: .infinity, alignment: .top) .navigationTitle(Text(verbatim: "Icons")) .navigationBarTitleDisplayMode(.large) } } } #Preview { NavigationStack { Image.iui.Storybook() } }