更改angular_components的模态背景颜色

时间:2017-10-30 21:27:45

标签: angular-dart

如何在dart的angular_components中自定义ModalComponent的背景颜色?

问题从这里开始:https://github.com/dart-lang/angular_components/issues/187

1 个答案:

答案 0 :(得分:1)

更改模态和其他对话框的对话框颜色就像更改CSS一样简单。例如:

CSS:

.blue-dialog {
  background-color: blue;
}

HTML:

<material-button (trigger)="showBasicDialog = true"
                 [disabled]="showBasicDialog"
                 raised>
  Open Basic Dialog
</material-button>

<modal [visible]="showBasicDialog">
  <material-dialog class="blue-dialog">My Blue Dialog</material-dialog>
</modal>