Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(useSwipe)!: rename type SwipeOptions to UseSwipeOptions and SwipeReturn to UseSwipeReturn #1891

Merged
merged 1 commit into from Jul 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/core/useSwipe/index.ts
Expand Up @@ -15,7 +15,7 @@ export enum SwipeDirection {
NONE = 'NONE',
}

export interface SwipeOptions extends ConfigurableWindow {
export interface UseSwipeOptions extends ConfigurableWindow {
/**
* Register events as passive
*
Expand Down Expand Up @@ -44,7 +44,7 @@ export interface SwipeOptions extends ConfigurableWindow {
onSwipeEnd?: (e: TouchEvent, direction: SwipeDirection) => void
}

export interface SwipeReturn {
export interface UseSwipeReturn {
isPassiveEventSupported: boolean
isSwiping: Ref<boolean>
direction: ComputedRef<SwipeDirection | null>
Expand All @@ -64,8 +64,8 @@ export interface SwipeReturn {
*/
export function useSwipe(
target: MaybeComputedRef<EventTarget | null | undefined>,
options: SwipeOptions = {},
): SwipeReturn {
options: UseSwipeOptions = {},
): UseSwipeReturn {
const {
threshold = 50,
onSwipe,
Expand Down