primevue-mirror/components/scrolltop/ScrollTop.d.ts

68 lines
1.7 KiB
TypeScript
Raw Normal View History

2023-03-01 13:12:34 +00:00
/**
*
* ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly.
*
* [Live Demo](https://www.primevue.org/scrolltop/)
*
* @module scrolltop
*
*/
2022-09-06 12:03:37 +00:00
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
2023-03-01 13:12:34 +00:00
/**
* Defines valid properties in ScrollTop component.
*/
2022-09-06 12:03:37 +00:00
export interface ScrollTopProps {
/**
* Target of the ScrollTop.
2023-03-01 13:12:34 +00:00
* @defaultValue window
2022-09-06 12:03:37 +00:00
*/
2023-03-01 13:12:34 +00:00
target?: 'window' | 'parent' | undefined;
2022-09-06 12:03:37 +00:00
/**
* Defines the threshold value of the vertical scroll position of the target to toggle the visibility.
2023-03-01 13:12:34 +00:00
* @defaultValue 400
2022-09-06 12:03:37 +00:00
*/
threshold?: number | undefined;
/**
* Icon to display.
2023-03-01 13:12:34 +00:00
* @defaultValue pi pi-chevron-up
2022-09-06 12:03:37 +00:00
*/
icon?: string | undefined;
/**
* Defines the scrolling behaviour, 'smooth' adds an animation and 'auto' scrolls with a jump.
2023-03-01 13:12:34 +00:00
* @defaultValue smooth
2022-09-06 12:03:37 +00:00
*/
behavior?: string | undefined;
}
2023-03-01 13:12:34 +00:00
/**
* Defines valid slots in ScrollTop component.
*/
2022-09-14 11:26:01 +00:00
export interface ScrollTopSlots {}
2022-09-06 12:03:37 +00:00
2023-03-01 13:12:34 +00:00
/**
* Defines valid emits in ScrollTop component.
*/
export interface ScrollTopEmits {}
2022-09-06 12:03:37 +00:00
2023-03-01 13:12:34 +00:00
/**
* **PrimeVue - ScrollTop**
*
* _ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly._
*
* [Live Demo](https://www.primevue.org/scrolltop/)
* --- ---
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo-100.png)
*
* @group Component
*/
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
}
}
export default ScrollTop;