Skip to content

Commit

Permalink
fix(useParallax)!: rename type ParallaxOptions to `UseParallaxOptio…
Browse files Browse the repository at this point in the history
…ns` and `ParallaxReturn` to `UseParallaxReturn` (#1885)
  • Loading branch information
okxiaoliang4 committed Jul 13, 2022
1 parent 9b4f956 commit e4b5bf2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/useParallax/index.ts
Expand Up @@ -6,14 +6,14 @@ import { useMouseInElement } from '../useMouseInElement'
import type { ConfigurableWindow } from '../_configurable'
import { defaultWindow } from '../_configurable'

export interface ParallaxOptions extends ConfigurableWindow {
export interface UseParallaxOptions extends ConfigurableWindow {
deviceOrientationTiltAdjust?: (i: number) => number
deviceOrientationRollAdjust?: (i: number) => number
mouseTiltAdjust?: (i: number) => number
mouseRollAdjust?: (i: number) => number
}

export interface ParallaxReturn {
export interface UseParallaxReturn {
/**
* Roll value. Scaled to `-0.5 ~ 0.5`
*/
Expand All @@ -37,8 +37,8 @@ export interface ParallaxReturn {
*/
export function useParallax(
target: MaybeElementRef,
options: ParallaxOptions = {},
): ParallaxReturn {
options: UseParallaxOptions = {},
): UseParallaxReturn {
const {
deviceOrientationTiltAdjust = i => i,
deviceOrientationRollAdjust = i => i,
Expand Down

0 comments on commit e4b5bf2

Please sign in to comment.