Angular2 Material Dialog css, dialog size

前端 未结 11 974
甜味超标
甜味超标 2020-12-25 10:52

Angular2 material team recently released the MDDialog https://github.com/angular/material2/blob/master/src/lib/dialog/README.md

I\'d like to change the looking and f

11条回答
  •  醉酒成梦
    2020-12-25 11:16

    You can also let angular material solve the size itself depending on the content. This means you don't have to cloud your TS files with sizes that depend on your UI. You can keep these in the HTML/CSS.

    my-dialog.html

    Your title

    my-dialog.scss

    .myContent {
        width: 300px;
        height: 150px;
    }
    

    my-component.ts

    const myInfo = {};
    this.dialog.open(MyDialogComponent, { data: myInfo });
    

提交回复
热议问题