Skip to content

Commit

Permalink
fix: package types
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmnouira committed Aug 21, 2021
1 parent 499e9ca commit f1020bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/useIonicHeaderParallax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function useIonHeaderParallax({
setTimeout(() => {
initElements()
}, 300)
}, [titleColor, image, expandedColor, maximumHeight, ref])
}, [image, titleColor, expandedColor, maximumHeight, ref])

const initElements = () => {
// ion-header
Expand Down Expand Up @@ -206,7 +206,7 @@ export function useIonHeaderParallax({
}
}


return {
ref,
}
Expand Down
6 changes: 5 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import * as React from "react"

export type UseIonHeaderParallaxInput = {
image: string
expandedColor?: string
titleColor?: string
maximumHeight?: number
}

export type UseIonHeaderParallaxResult = void
export type UseIonHeaderParallaxResult = {
ref: React.RefObject<any>
}

export function useIonHeaderParallax(input: UseIonHeaderParallaxInput): UseIonHeaderParallaxResult

0 comments on commit f1020bb

Please sign in to comment.