From 46126b139ceff50f7408d1525f7318e6c97a7998 Mon Sep 17 00:00:00 2001 From: Annie Wang Date: Thu, 25 Feb 2021 16:42:51 -0800 Subject: [PATCH] fix(material-experimental/mdc-snack-bar): use mdc-button instead of legacy button --- src/material-experimental/mdc-snack-bar/BUILD.bazel | 1 + .../mdc-snack-bar/_snack-bar-theme.scss | 7 ++++++- src/material-experimental/mdc-snack-bar/module.ts | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/material-experimental/mdc-snack-bar/BUILD.bazel b/src/material-experimental/mdc-snack-bar/BUILD.bazel index bdf80ba2c8b7..2a6413fe53bb 100644 --- a/src/material-experimental/mdc-snack-bar/BUILD.bazel +++ b/src/material-experimental/mdc-snack-bar/BUILD.bazel @@ -22,6 +22,7 @@ ng_module( module_name = "@angular/material-experimental/mdc-snack-bar", deps = [ "//src:dev_mode_types", + "//src/material-experimental/mdc-button", "//src/material-experimental/mdc-core", "//src/material/snack-bar", "@npm//@angular/core", diff --git a/src/material-experimental/mdc-snack-bar/_snack-bar-theme.scss b/src/material-experimental/mdc-snack-bar/_snack-bar-theme.scss index f2904b37b9c3..1fd44f7435d9 100644 --- a/src/material-experimental/mdc-snack-bar/_snack-bar-theme.scss +++ b/src/material-experimental/mdc-snack-bar/_snack-bar-theme.scss @@ -36,10 +36,15 @@ $mdc-snackbar-label-ink-color: $orig-mdc-snackbar-label-ink-color !global; $mdc-snackbar-dismiss-ink-color: $orig-mdc-snackbar-dismiss-ink-color !global; - .mat-mdc-simple-snack-bar .mdc-snackbar__action { + .mat-mdc-simple-snack-bar .mat-mdc-snack-bar-actions .mat-mdc-snack-bar-action { $is-dark-theme: map.get($config, is-dark); $accent: map.get($config, accent); color: if($is-dark-theme, inherit, theming.color($accent, text)); + + .mat-ripple-element { + background-color: currentColor; + opacity: 0.01; + } } } diff --git a/src/material-experimental/mdc-snack-bar/module.ts b/src/material-experimental/mdc-snack-bar/module.ts index 70de7103aa51..8c1a8d6b0706 100644 --- a/src/material-experimental/mdc-snack-bar/module.ts +++ b/src/material-experimental/mdc-snack-bar/module.ts @@ -10,7 +10,7 @@ import {OverlayModule} from '@angular/cdk/overlay'; import {PortalModule} from '@angular/cdk/portal'; import {CommonModule} from '@angular/common'; import {NgModule} from '@angular/core'; -import {MatButtonModule} from '@angular/material/button'; +import {MatButtonModule} from '@angular/material-experimental/mdc-button'; import {MatCommonModule} from '@angular/material-experimental/mdc-core'; import {MatSimpleSnackBar} from './simple-snack-bar';