mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4327] added templating for content dialog (#4549)
* [ADF-4327] added templating for content dialog * [ADF-4327] added unit test and documentation
This commit is contained in:
@@ -37,6 +37,34 @@ dialogRef.afterClosed().subscribe((result) => {
|
||||
});
|
||||
```
|
||||
|
||||
### Rendering custom html body
|
||||
It is possible now to render a custom html instead of a plain message as confirm body via the attribute `htmlContent`. The html will be sanitized and then showed.
|
||||
|
||||
|
||||
```ts
|
||||
constructor(private dialog: MatDialog) {}
|
||||
|
||||
...
|
||||
|
||||
let files = [
|
||||
// Files defined here...
|
||||
];
|
||||
|
||||
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
|
||||
data: {
|
||||
title: 'Upload',
|
||||
htmlContent: '<div> <p>A</p> <p>Custom</p> <p>Content</p> </div>'
|
||||
},
|
||||
minWidth: '250px'
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe((result) => {
|
||||
if (result === true) {
|
||||
event.resumeUpload();
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
## Details
|
||||
|
||||
This component lets the user make a yes/no choice to confirm an action. Use the
|
||||
|
Reference in New Issue
Block a user