forked from angular/components
/
snack-bar-styles.ts
43 lines (38 loc) · 1.32 KB
/
snack-bar-styles.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {ClassNameChange, StyleMigrator} from '../../style-migrator';
export class SnackBarMigrator extends StyleMigrator {
component = 'snack-bar';
// There are no other selectors with the 'mat-snack-bar' prefix available
// aside from the specified changes below
deprecatedPrefixes = [];
mixinChanges = [
{
old: 'legacy-snack-bar-theme',
new: ['snack-bar-theme', 'button-theme'],
checkForDuplicates: true,
},
{
old: 'legacy-snack-bar-color',
new: ['snack-bar-color', 'button-color'],
checkForDuplicates: true,
},
{
old: 'legacy-snack-bar-typography',
new: ['snack-bar-typography', 'button-typography'],
checkForDuplicates: true,
},
];
classChanges: ClassNameChange[] = [
{old: '.mat-snack-bar-container', new: '.mat-mdc-snack-bar-container'},
{old: '.mat-snack-bar-handset', new: '.mat-mdc-snack-bar-handset'},
{old: '.mat-simple-snackbar', new: '.mat-mdc-simple-snack-bar'},
{old: '.mat-simple-snack-bar-content', new: '.mat-mdc-snack-bar-label'},
{old: '.mat-simple-snackbar-action', new: '.mat-mdc-snack-bar-action'},
];
}