Files
comaps/iphone/Maps/UI/New Group/MapZoomButtonKind.swift
Yannik Bloscheck bff4b2348a [ios] WIP: Switching main/map buttons to SwiftUI
Signed-off-by: Yannik Bloscheck <git@yannikbloscheck.com>
2025-11-07 21:07:34 +01:00

39 lines
892 B
Swift

import SwiftUI
extension MapZoomButton {
/// The type of the map zoom button
enum Kind: String, Codable, CaseIterable, Identifiable {
case `in` = "In"
case out = "Out"
// MARK: Properties
/// The id
var id: Self { self }
/// The description text
var description: String {
switch self {
case .in:
return String(localized: "zoom_in")
case .out:
return String(localized: "zoom_out")
}
}
/// The image
var image: Image {
switch self {
case .in:
return Image(systemName: "plus")
case .out:
return Image(systemName: "minus")
}
}
}
}