mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(snackbar): swap enter and exit animation curves (#6791)
- Use animation constants for maintainability
This commit is contained in:
committed by
Andrew Seguin
parent
a0bb1a36bb
commit
4f571b1d93
@@ -33,15 +33,16 @@ import {
|
||||
PortalHostDirective,
|
||||
} from '@angular/cdk/portal';
|
||||
import {first} from '@angular/cdk/rxjs';
|
||||
import {AnimationCurves, AnimationDurations} from '@angular/material/core';
|
||||
import {Observable} from 'rxjs/Observable';
|
||||
import {Subject} from 'rxjs/Subject';
|
||||
import {MatSnackBarConfig} from './snack-bar-config';
|
||||
|
||||
|
||||
// TODO(jelbourn): we can't use constants from animation.ts here because you can't use
|
||||
// a text interpolation in anything that is analyzed statically with ngc (for AoT compile).
|
||||
export const SHOW_ANIMATION = '225ms cubic-bezier(0.4,0.0,1,1)';
|
||||
export const HIDE_ANIMATION = '195ms cubic-bezier(0.0,0.0,0.2,1)';
|
||||
export const SHOW_ANIMATION =
|
||||
`${AnimationDurations.ENTERING} ${AnimationCurves.DECELERATION_CURVE}`;
|
||||
export const HIDE_ANIMATION =
|
||||
`${AnimationDurations.EXITING} ${AnimationCurves.ACCELERATION_CURVE}`;
|
||||
|
||||
/**
|
||||
* Internal component that wraps user-provided snack bar content.
|
||||
|
||||
Reference in New Issue
Block a user