Browse Source

feat(theme-shared): add toast in and out animations

pull/2606/head
TheDiaval 7 years ago
parent
commit
547d1a8a20
  1. 17
      npm/ng-packs/packages/theme-shared/src/lib/animations/toast.animations.ts

17
npm/ng-packs/packages/theme-shared/src/lib/animations/toast.animations.ts

@ -0,0 +1,17 @@
import { animate, query, style, transition, trigger } from '@angular/animations';
export const toastInOut = trigger('toastInOut', [
transition('* <=> *', [
query(
':enter',
[
style({ opacity: 0, transform: 'translateY(20px)' }),
animate('350ms ease', style({ opacity: 1, transform: 'translateY(0)' })),
],
{ optional: true },
),
query(':leave', animate('450ms ease', style({ opacity: 0 })), {
optional: true,
}),
]),
]);
Loading…
Cancel
Save