Skip to content

Commit

Permalink
fix: export missing ModalClosingAction type
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesMangwa committed Mar 8, 2024
1 parent 2d748b9 commit 0973646
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@ export type ModalEventListeners = Set<{
export type ModalEventName = 'onAnimate' | 'onClose'

export type ModalOnAnimateEventCallback = (value?: number) => void
export type ModalOnCloseEventCallback = (closingAction: {

export type ModalClosingAction = {
type: ModalClosingActionName
origin: ModalClosingActionOrigin
}) => void
export type ModalClosingActionName = 'closeModal' | 'closeModals' | 'closeAllModals'
}
export type ModalClosingActionOrigin = 'default' | 'fling' | 'backdrop'
export type ModalClosingActionName = 'closeModal' | 'closeModals' | 'closeAllModals'
export type ModalOnCloseEventCallback = (closingAction: ModalClosingAction) => void

export type ModalEventCallback = ModalOnAnimateEventCallback | ModalOnCloseEventCallback

export type ModalEventListener = { remove: () => boolean }
Expand Down

0 comments on commit 0973646

Please sign in to comment.