mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #3965, Improve build and Added *Base models
This commit is contained in:
parent
f4ba20b222
commit
9247620421
134 changed files with 4230 additions and 1729 deletions
48
components/lib/ripple/BaseRipple.js
Normal file
48
components/lib/ripple/BaseRipple.js
Normal file
|
@ -0,0 +1,48 @@
|
|||
import BaseDirective from 'primevue/basedirective';
|
||||
import { useStyle } from 'primevue/usestyle';
|
||||
|
||||
const styles = `
|
||||
.p-ripple {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-ink {
|
||||
display: block;
|
||||
position: absolute;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
border-radius: 100%;
|
||||
transform: scale(0);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.p-ink-active {
|
||||
animation: ripple 0.4s linear;
|
||||
}
|
||||
|
||||
.p-ripple-disabled .p-ink {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@keyframes ripple {
|
||||
100% {
|
||||
opacity: 0;
|
||||
transform: scale(2.5);
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
root: 'p-ink'
|
||||
};
|
||||
|
||||
const { load: loadStyle } = useStyle(styles, { name: 'ripple', manual: true });
|
||||
|
||||
const BaseRipple = BaseDirective.extend({
|
||||
css: {
|
||||
classes,
|
||||
loadStyle
|
||||
}
|
||||
});
|
||||
|
||||
export default BaseRipple;
|
Loading…
Add table
Add a link
Reference in a new issue