main
swift 26 lines 605 Bytes
Raw
1 //
2 // HeroItem.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 HeroItem: JomloItem, @unchecked Sendable {
12 let id: String
13 let title: String
14 let subtitle: String
15 let gradientColors: (top: String, bottom: String)
16
17 nonisolated var itemIdentifier: String { id }
18
19 nonisolated static func == (lhs: HeroItem, rhs: HeroItem) -> Bool {
20 lhs.id == rhs.id
21 }
22
23 nonisolated func hash(into hasher: inout Hasher) {
24 hasher.combine(id)
25 }
26 }