2022-09-12 07:13:52 +00:00
|
|
|
const ScrollTopProps = [
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'target',
|
|
|
|
type: 'string',
|
|
|
|
default: 'window',
|
2022-09-12 07:13:52 +00:00
|
|
|
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-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'icon',
|
|
|
|
type: 'string',
|
2023-04-07 23:06:45 +00:00
|
|
|
default: 'undefined',
|
2022-09-14 14:26:41 +00:00
|
|
|
description: 'Icon to display.'
|
2022-09-12 07:13:52 +00:00
|
|
|
},
|
|
|
|
{
|
2022-09-14 14:26:41 +00:00
|
|
|
name: 'behavior',
|
|
|
|
type: 'string',
|
|
|
|
default: 'smooth',
|
2022-09-12 07:13:52 +00:00
|
|
|
description: 'Defines the scrolling behavi, "smooth" adds an animation and "auto" scrolls with a jump.'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2023-04-07 23:06:45 +00:00
|
|
|
const ScrollTopSlots = [
|
|
|
|
{
|
|
|
|
name: 'icon',
|
|
|
|
description: 'Custom scrolltop icon template.'
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2022-09-12 07:13:52 +00:00
|
|
|
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.',
|
2023-04-07 23:06:45 +00:00
|
|
|
props: ScrollTopProps,
|
|
|
|
slots: ScrollTopSlots
|
2022-09-12 07:13:52 +00:00
|
|
|
}
|
|
|
|
};
|