2022-09-06 12:03:37 +00:00
|
|
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
|
|
|
|
|
|
type ScrollTopTargetType = 'window' | 'parent' | undefined;
|
|
|
|
|
|
|
|
export interface ScrollTopProps {
|
|
|
|
/**
|
|
|
|
* Target of the ScrollTop.
|
|
|
|
* @see ScrollTopTargetType
|
|
|
|
* Default value is 'window'.
|
|
|
|
*/
|
|
|
|
target?: ScrollTopTargetType;
|
|
|
|
/**
|
|
|
|
* Defines the threshold value of the vertical scroll position of the target to toggle the visibility.
|
|
|
|
* Default value is 400.
|
|
|
|
*/
|
|
|
|
threshold?: number | undefined;
|
|
|
|
/**
|
|
|
|
* Icon to display.
|
|
|
|
* Default value is 'pi pi-chevron-up'.
|
|
|
|
*/
|
|
|
|
icon?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Defines the scrolling behaviour, 'smooth' adds an animation and 'auto' scrolls with a jump.
|
|
|
|
* Default value is 'smooth'.
|
|
|
|
*/
|
|
|
|
behavior?: string | undefined;
|
|
|
|
}
|
|
|
|
|
2022-09-14 11:26:01 +00:00
|
|
|
export interface ScrollTopSlots {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2022-09-14 11:26:01 +00:00
|
|
|
export declare type ScrollTopEmits = {};
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2022-09-14 11:26:01 +00:00
|
|
|
declare class ScrollTop extends ClassComponent<ScrollTopProps, ScrollTopSlots, ScrollTopEmits> {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
|
|
|
declare module '@vue/runtime-core' {
|
|
|
|
interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
ScrollTop: GlobalComponentConstructor<ScrollTop>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly.
|
|
|
|
*
|
|
|
|
* Demos:
|
|
|
|
*
|
2022-09-14 11:26:01 +00:00
|
|
|
* - [ScrollTop](https://www.primefaces.org/primevue/scrolltop)
|
2022-09-06 12:03:37 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
export default ScrollTop;
|