Skip to content

Commit

Permalink
Add access to properties of ModalCover and move Style to non-generic …
Browse files Browse the repository at this point in the history
…context
  • Loading branch information
mikolasstuchlik committed Aug 23, 2024
1 parent a2287de commit 3cb1205
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Sources/FuturedArchitecture/Architecture/Coordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public protocol Coordinator: ObservableObject {
}

public extension Coordinator {
func present(modal destination: Destination, type: ModalCoverModel<Destination>.Style) {
func present(modal destination: Destination, type: ModalCoverModelStyle) {
switch type {
case .sheet:
Task { @MainActor in
Expand Down
20 changes: 10 additions & 10 deletions Sources/FuturedArchitecture/Architecture/ModalCoverModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@

import Foundation

public struct ModalCoverModel<Destination: Hashable & Identifiable>: Identifiable {
let destination: Destination
let style: Style

public enum Style {
case sheet
#if !os(macOS)
case fullscreenCover
#endif
}
public enum ModalCoverModelStyle {
case sheet
#if !os(macOS)
case fullscreenCover
#endif
}

public struct ModalCoverModel<Destination: Hashable & Identifiable>: Identifiable {
public let destination: Destination
public let style: ModalCoverModelStyle

public var id: Destination.ID {
destination.id
}
Expand Down

0 comments on commit 3cb1205

Please sign in to comment.