primevue-mirror/components/lib/scrolltop/style/ScrollTopStyle.js

43 lines
712 B
JavaScript
Raw Normal View History

import BaseStyle from 'primevue/base/style';
const theme = ({ dt }) => `
2024-05-10 11:16:37 +00:00
.p-scrolltop.p-button {
position: fixed;
bottom: 20px;
right: 20px;
}
2024-05-10 11:16:37 +00:00
.p-scrolltop-sticky.p-button {
position: sticky;
2024-05-10 11:16:37 +00:00
display: flex;
margin-left: auto;
}
.p-scrolltop-enter-from {
opacity: 0;
}
.p-scrolltop-enter-active {
transition: opacity 0.15s;
}
.p-scrolltop.p-scrolltop-leave-to {
opacity: 0;
}
.p-scrolltop-leave-active {
transition: opacity 0.15s;
}
`;
const classes = {
2024-05-04 12:12:43 +00:00
root: ({ props }) => ['p-scrolltop', { 'p-scrolltop-sticky': props.target !== 'window' }],
icon: 'p-scrolltop-icon'
};
export default BaseStyle.extend({
name: 'scrolltop',
theme,
classes
});