Fixed #1836 - For ScrollTop

pull/1846/head
mertsincan 2021-12-01 17:16:03 +03:00
parent 77bb9cab97
commit 7ec9d396e9
1 changed files with 47 additions and 7 deletions

View File

@ -1,12 +1,52 @@
interface ScrollTopProps {
target?: string;
threshold?: number;
icon?: string;
behavior?: string;
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
type ScrollTopTargetType = 'window' | 'parent';
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;
}
declare class ScrollTop {
$props: ScrollTopProps;
export interface ScrollTopSlots {
}
export declare type ScrollTopEmits = {
}
declare class ScrollTop extends ClassComponent<ScrollTopProps, ScrollTopSlots, ScrollTopEmits> { }
declare module '@vue/runtime-core' {
interface GlobalComponents {
ScrollTop: GlobalComponentConstructor<ScrollTop>
}
}
/**
*
* ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly.
*
* Demos:
*
* - [ScrollTop](https://www.primefaces.org/primevue/showcase/#/scrolltop)
*
*/
export default ScrollTop;