-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from infinum/feature/code-updates
Feature/code updates
- Loading branch information
Showing
37 changed files
with
769 additions
and
720 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// | ||
// CustomInfoToolSection.swift | ||
// Sentinel | ||
// | ||
// Created by Zvonimir Medak on 18.12.2024.. | ||
// | ||
|
||
import Foundation | ||
|
||
public extension CustomInfoTool { | ||
|
||
/// Section Item for the CustomInfoTool which expects CustomInfoTool.Item for its items | ||
struct Section { | ||
|
||
// MARK: - Internal properties | ||
|
||
let title: String? | ||
let items: [Item] | ||
|
||
// MARK: - Lifecycle | ||
|
||
public init(title: String? = nil, items: [Item]) { | ||
self.title = title | ||
self.items = items | ||
} | ||
} | ||
|
||
/// Row Item for the CustomInfoTool which will show a title + value pair | ||
struct Item { | ||
|
||
// MARK: - Internal properties | ||
|
||
let title: String | ||
let value: String | ||
|
||
// MARK: - Lifecycle | ||
|
||
public init(title: String, value: String) { | ||
self.title = title | ||
self.value = value | ||
} | ||
} | ||
|
||
} | ||
|
||
// MARK: - Equatable conformance | ||
|
||
extension CustomInfoTool.Item: Equatable { | ||
|
||
public static func == (lhs: CustomInfoTool.Item, rhs: CustomInfoTool.Item) -> Bool { | ||
lhs.title == rhs.title | ||
} | ||
} | ||
|
||
// MARK: - Identifiable conformance | ||
|
||
extension CustomInfoTool.Item: Identifiable { | ||
|
||
public var id: String { | ||
title | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.