feature/v1
swift 26 lines 591 Bytes
Raw
1 //
2 // CategoryItem.swift
3 // JomloCollectionView Example
4 //
5 // Created by Seto Elkahfi on 2026-01-27.
6 // Copyright © 2026 Seto Elkahfi. All rights reserved.
7 //
8
9 import JomloCollectionView
10
11 struct CategoryItem: JomloItem, @unchecked Sendable {
12 let id: String
13 let name: String
14 let iconName: String
15 let colorHex: String
16
17 nonisolated var itemIdentifier: String { id }
18
19 nonisolated static func == (lhs: CategoryItem, rhs: CategoryItem) -> Bool {
20 lhs.id == rhs.id
21 }
22
23 nonisolated func hash(into hasher: inout Hasher) {
24 hasher.combine(id)
25 }
26 }