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:
@@ -0,0 +1,51 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { ConfirmDialogComponent } from '@alfresco/adf-content-services';
|
||||
|
||||
@Component({
|
||||
selector: 'app-confirm-dialog-example',
|
||||
templateUrl: 'confirm-dialog-example.component.html',
|
||||
styleUrls: ['confirm-dialog-example.component.scss']
|
||||
})
|
||||
export class ConfirmDialogExampleComponent {
|
||||
|
||||
constructor(private dialog: MatDialog) { }
|
||||
|
||||
openConfirmDefaultDialog() {
|
||||
this.dialog.open(ConfirmDialogComponent, {
|
||||
data: {
|
||||
title: 'Upload',
|
||||
message: `This is the default message`
|
||||
},
|
||||
minWidth: '250px'
|
||||
});
|
||||
}
|
||||
|
||||
openConfirmCustomDialog() {
|
||||
this.dialog.open(ConfirmDialogComponent, {
|
||||
data: {
|
||||
title: 'Upload',
|
||||
message: `This is the default message`,
|
||||
htmlContent: '<div> <p>A</p> <p>Custom</p> <p>Content</p> </div>'
|
||||
},
|
||||
minWidth: '250px'
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user