Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import {
AnimationTriggerMetadata,
trigger,
state,
transition,
style,
animate,
} from '@angular/animations';
export const toastAnimations: {
readonly fadeToast: AnimationTriggerMetadata;
} = {
fadeToast: trigger('fadeAnimation', [
state('in', style({ opacity: 1 })),
transition('void => *', [style({ opacity: 0 }), animate('{{ fadeIn }}ms')]),
transition(
'default => closing',
animate('{{ fadeOut }}ms', style({ opacity: 0 })),
),
]),
};
export type ToastAnimationState = 'default' | 'closing';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.