mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 23:43:01 +00:00
simple loading animation and fade in and out animations
This commit is contained in:
24
src/app/shared/animations/fade.ts
Normal file
24
src/app/shared/animations/fade.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { animate, state, transition, trigger, style, keyframes } from '@angular/animations';
|
||||
|
||||
const fadeEnter = transition(':enter', [
|
||||
style({ opacity: 0 }),
|
||||
animate(300, style({ opacity: 1 }))
|
||||
]);
|
||||
|
||||
const fadeLeave = transition(':leave', [
|
||||
style({ opacity: 1 }),
|
||||
animate(400, style({ opacity: 0 }))
|
||||
]);
|
||||
|
||||
export const fadeIn = trigger('fadeIn', [
|
||||
fadeEnter
|
||||
]);
|
||||
|
||||
export const fadeOut = trigger('fadeOut', [
|
||||
fadeLeave
|
||||
]);
|
||||
|
||||
export const fadeInOut = trigger('fadeInOut', [
|
||||
fadeEnter,
|
||||
fadeLeave
|
||||
]);
|
Reference in New Issue
Block a user