Skip to content

Commit

Permalink
fix #29 move enum DismissAction to FastisController
Browse files Browse the repository at this point in the history
  • Loading branch information
UriyDevyataev committed Aug 30, 2023
1 parent bb686e0 commit adc93e9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Sources/Models/Value.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ public enum FastisModeRange {
case range
}

public enum DismissAction {
case done(FastisValue?)
case cancel
}

extension Date: FastisValue {

/// Mode of value for ``FastisController``. Always `.single`
Expand Down
15 changes: 15 additions & 0 deletions Sources/Views/Controller.swift
Original file line number Diff line number Diff line change
Expand Up @@ -769,3 +769,18 @@ public extension FastisConfig {

}
}

public extension FastisController {

/**
Parameter to return in the dismissHandler
`.done(Value?)` - If a date is selected.
`.cancel` - if controller closed without date selection
*/

enum DismissAction {
case done(Value?)
case cancel
}
}

0 comments on commit adc93e9

Please sign in to comment.