File tree Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 1
1
{{data.message}}
2
2
3
- < button
4
- class =" mat-simple-snackbar-action "
5
- *ngIf =" hasAction "
6
- (click) =" action() " > {{data.action}} </ button >
3
+ < div class =" mat-simple-snackbar-action " >
4
+ < button mat-button *ngIf =" hasAction "
5
+ (click) =" action() " > {{data.action}} </ button >
6
+ </ div >
Original file line number Diff line number Diff line change 2
2
@import ' ../core/style/button-common' ;
3
3
@import ' ../core/style/list-common' ;
4
4
5
- $mat-snack-bar-button-margin : 48 px !default ;
5
+ $mat-snack-bar-button-margin : 8 px !default ;
6
6
7
7
.mat-simple-snackbar {
8
8
display : flex ;
@@ -11,14 +11,19 @@ $mat-snack-bar-button-margin: 48px !default;
11
11
}
12
12
13
13
.mat-simple-snackbar-action {
14
- @include mat-button-reset ;
15
-
16
- background : none ;
14
+ display : flex ;
15
+ flex-direction : column ;
17
16
flex-shrink : 0 ;
18
- margin-left : $mat-snack-bar-button-margin ;
17
+ justify-content : space-around ;
18
+ margin : -8px 0 -8px $mat-snack-bar-button-margin ;
19
+
20
+ button {
21
+ flex : 1 ;
22
+ max-height : 36px ;
23
+ }
19
24
20
25
[dir = ' rtl' ] & {
21
- margin-right : $mat-snack-bar-button-margin ;
22
26
margin-left : 0 ;
27
+ margin-right : $mat-snack-bar-button-margin ;
23
28
}
24
29
}
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {OverlayModule} from '@angular/cdk/overlay';
12
12
import { PortalModule } from '@angular/cdk/portal' ;
13
13
import { LIVE_ANNOUNCER_PROVIDER } from '@angular/cdk/a11y' ;
14
14
import { MatCommonModule } from '@angular/material/core' ;
15
+ import { MatButtonModule } from '@angular/material/button' ;
15
16
import { MatSnackBar } from './snack-bar' ;
16
17
import { MatSnackBarContainer } from './snack-bar-container' ;
17
18
import { SimpleSnackBar } from './simple-snack-bar' ;
@@ -22,6 +23,7 @@ import {SimpleSnackBar} from './simple-snack-bar';
22
23
OverlayModule ,
23
24
PortalModule ,
24
25
CommonModule ,
26
+ MatButtonModule ,
25
27
MatCommonModule ,
26
28
] ,
27
29
exports : [ MatSnackBarContainer , MatCommonModule ] ,
You can’t perform that action at this time.
0 commit comments