|
1 |
| -import type { Ref, ComputedRef, CSSProperties, ShallowRef } from 'vue' |
| 1 | +import type { Ref, ComputedRef } from 'vue' |
2 | 2 |
|
3 | 3 | export type MaybeTemplateRef = HTMLElement | null | Ref<HTMLElement | null>
|
4 | 4 |
|
5 | 5 | export interface UseFixedHeaderOptions<T = any> {
|
6 | 6 | /**
|
7 |
| - * Use `null` if content is scrolled by the window (default), |
8 |
| - * otherwise pass a custom scrolling container template ref */ |
9 |
| - root?: MaybeTemplateRef |
10 |
| - /** |
11 |
| - * Whether to toggle `visibility: hidden` on leave. |
12 |
| - * Set this to `false` if you want to keep the header |
13 |
| - * visible. |
| 7 | + * Scrolling container, defaults to `document.documentElement` |
| 8 | + * when `null`. |
| 9 | + * |
| 10 | + * @default null |
14 | 11 | */
|
15 |
| - toggleVisibility?: boolean |
16 |
| - /** |
17 |
| - * ref or computed to watch for automatic behavior toggling */ |
18 |
| - watch?: Ref<T> | ComputedRef<T> |
19 |
| - /** |
20 |
| - * Minimum acceleration delta required to hide the header */ |
21 |
| - leaveDelta?: number |
22 |
| - /** |
23 |
| - * Minimum acceleration delta required to show the header */ |
24 |
| - enterDelta?: number |
| 12 | + root: MaybeTemplateRef |
25 | 13 | /**
|
26 |
| - * Custom enter transition styles */ |
27 |
| - enterStyles?: CSSProperties |
| 14 | + * Signal without `.value` (ref or computed) to be watched |
| 15 | + * for automatic behavior toggling. |
| 16 | + * |
| 17 | + * @default null |
| 18 | + */ |
| 19 | + watch: Ref<T> | ComputedRef<T> |
28 | 20 | /**
|
29 |
| - * Custom leave transition styles */ |
30 |
| - leaveStyles?: CSSProperties |
31 |
| -} |
32 |
| - |
33 |
| -export interface UseFixedHeaderReturn { |
34 |
| - styles: ShallowRef<CSSProperties> |
35 |
| - isLeave: ComputedRef<boolean> |
36 |
| - isEnter: ComputedRef<boolean> |
| 21 | + * Whether to transition `opacity` propert from 0 to 1 |
| 22 | + * and vice versa along with the `transform` property |
| 23 | + * |
| 24 | + * @default false |
| 25 | + */ |
| 26 | + transitionOpacity: boolean |
37 | 27 | }
|
0 commit comments