Angular 2/4 How to style angular material design snackbar

前端 未结 7 2019
广开言路
广开言路 2021-02-03 22:22

I am new to Angular2/4 and angular typescript. I want to style the angular material design snackbar for example change the background color from black and font

7条回答
  •  無奈伤痛
    2021-02-03 22:54

    From mat SnackBarConfig Class you can add

    panelClass: string | string[]

    "Extra CSS classes to be added to the snack bar container".

    this.snackBar.open("Your custom Message", '', {
          panelClass:"custom_sneak_bar"
    }
    

提交回复
热议问题