primevue-mirror/api-generator/components/scrolltop.js

55 lines
1.4 KiB
JavaScript
Raw Normal View History

const ScrollTopProps = [
{
2022-09-14 14:26:41 +00:00
name: 'target',
type: 'string',
default: 'window',
description: 'Target of the ScrollTop, valid values are "window" and "parent".'
},
{
2022-09-14 14:26:41 +00:00
name: 'threshold',
type: 'number',
default: '400',
description: 'Defines the threshold value of the vertical scroll position of the target to toggle the visibility.'
},
{
2022-09-14 14:26:41 +00:00
name: 'icon',
type: 'string',
default: 'undefined',
2022-09-14 14:26:41 +00:00
description: 'Icon to display.'
},
{
2022-09-14 14:26:41 +00:00
name: 'behavior',
type: 'string',
default: 'smooth',
description: 'Defines the scrolling behavi, "smooth" adds an animation and "auto" scrolls with a jump.'
2023-04-21 13:42:00 +00:00
},
{
name: 'pt',
type: 'any',
default: 'null',
2023-08-01 14:01:12 +00:00
description: 'Used to pass attributes to DOM elements inside the component.'
2023-07-06 13:20:37 +00:00
},
{
name: 'unstyled',
type: 'boolean',
default: 'false',
description: 'When enabled, it removes component related styles in the core.'
}
];
const ScrollTopSlots = [
{
name: 'icon',
description: 'Custom scrolltop icon template.'
}
];
module.exports = {
scrolltop: {
2022-09-14 14:26:41 +00:00
name: 'ScrollTop',
description: 'ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly.',
props: ScrollTopProps,
slots: ScrollTopSlots
}
};