Skip to content

Commit 9f3bf27

Browse files
crisbetommalerba
authored andcommitted
refactor(snack-bar): remove overly broad animation variables (#10405)
Removes the `SHOW_ANIMATION` and `HIDE_ANIMATION` variables from the snack bar which were being exported all the way up to `@angular/material` and were implying that these are generic show and hide animations. BREAKING CHANGES: * `SHOW_ANIMATION` has been removed. * `HIDE_ANIMATION` has been removed.
1 parent e8af5ae commit 9f3bf27

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/lib/snack-bar/snack-bar-animations.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ import {
1515
} from '@angular/animations';
1616
import {AnimationCurves, AnimationDurations} from '@angular/material/core';
1717

18-
/** @docs-private */
19-
export const SHOW_ANIMATION =
20-
`${AnimationDurations.ENTERING} ${AnimationCurves.DECELERATION_CURVE}`;
21-
22-
/** @docs-private */
23-
export const HIDE_ANIMATION =
24-
`${AnimationDurations.EXITING} ${AnimationCurves.ACCELERATION_CURVE}`;
25-
2618
/** Animations used by the Material snack bar. */
2719
export const matSnackBarAnimations: {
2820
readonly contentFade: AnimationTriggerMetadata;
@@ -40,7 +32,8 @@ export const matSnackBarAnimations: {
4032
snackBarState: trigger('state', [
4133
state('visible-top, visible-bottom', style({transform: 'translateY(0%)'})),
4234
transition('visible-top => hidden-top, visible-bottom => hidden-bottom',
43-
animate(HIDE_ANIMATION)),
44-
transition('void => visible-top, void => visible-bottom', animate(SHOW_ANIMATION)),
35+
animate(`${AnimationDurations.EXITING} ${AnimationCurves.ACCELERATION_CURVE}`)),
36+
transition('void => visible-top, void => visible-bottom',
37+
animate(`${AnimationDurations.ENTERING} ${AnimationCurves.DECELERATION_CURVE}`)),
4538
])
4639
};

0 commit comments

Comments
 (0)