mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Fixed #5667 - Remove base option from theme config
This commit is contained in:
parent
6d688ef675
commit
0979dde96d
438 changed files with 10872 additions and 11957 deletions
|
@ -1,5 +1,62 @@
|
|||
import BaseStyle from 'primevue/base/style';
|
||||
|
||||
const theme = ({ dt }) => `
|
||||
.p-scrolltop {
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: ${dt('scrolltop.background')};
|
||||
color: ${dt('scrolltop.color')};
|
||||
}
|
||||
|
||||
.p-scrolltop:hover {
|
||||
background: ${dt('scrolltop.hover.background')};
|
||||
color: ${dt('scrolltop.hover.text')};
|
||||
}
|
||||
|
||||
.p-scrolltop-icon {
|
||||
font-size: 1.5rem;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
}
|
||||
|
||||
.p-scrolltop-sticky {
|
||||
position: sticky;
|
||||
}
|
||||
|
||||
.p-scrolltop-sticky {
|
||||
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;
|
||||
}
|
||||
|
||||
.p-scrolltop {
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
||||
transition: background ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
||||
outline-color: transparent;
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
root: ({ props }) => ['p-scrolltop p-link p-component', { 'p-scrolltop-sticky': props.target !== 'window' }],
|
||||
icon: 'p-scrolltop-icon'
|
||||
|
@ -7,5 +64,6 @@ const classes = {
|
|||
|
||||
export default BaseStyle.extend({
|
||||
name: 'scrolltop',
|
||||
theme,
|
||||
classes
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue