mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Documentation update 3.6.0 (#5257)
* documentation update 3.6.0 * documentation update 3.6.0 * update missing doc
This commit is contained in:
@@ -5,7 +5,7 @@ Status: Active
|
||||
Last reviewed: 2019-01-22
|
||||
---
|
||||
|
||||
# [Confirm dialog component](../../../lib/content-services/dialogs/confirm.dialog.ts "Defined in confirm.dialog.ts")
|
||||
# [Confirm dialog component](../../../lib/content-services/src/lib/dialogs/confirm.dialog.ts "Defined in confirm.dialog.ts")
|
||||
|
||||
Requests a yes/no choice from the user.
|
||||
|
||||
@@ -13,16 +13,18 @@ Requests a yes/no choice from the user.
|
||||

|
||||
|
||||
## Dialog inputs
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ---- | ----------- |
|
||||
| title | `string` | `Confirm` | It will be placed in the dialog title section. |
|
||||
| yesLabel | `string` | `yes` | It will be placed first in the dialog action section |
|
||||
| noLabel | `string` | `no`| It will be placed last in the dialog action section |
|
||||
| thirdOptionLabel (optional) | `string` | | It is not a mandatory input. it will be rendered in between yes and no label |
|
||||
| message | `string` | `Do you want to proceed?` | It will be rendered in the dialog content area |
|
||||
| htmlContent | `html` | | It will be rendered in the dialog content area |
|
||||
|
||||
*note*: `if input is not passed, default value will be rendered`
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| title | `string` | `Confirm` | It will be placed in the dialog title section. |
|
||||
| yesLabel | `string` | `yes` | It will be placed first in the dialog action section |
|
||||
| noLabel | `string` | `no` | It will be placed last in the dialog action section |
|
||||
| thirdOptionLabel (optional) | `string` | | It is not a mandatory input. it will be rendered in between yes and no label |
|
||||
| message | `string` | `Do you want to proceed?` | It will be rendered in the dialog content area |
|
||||
| htmlContent | `html` | | It will be rendered in the dialog content area |
|
||||
|
||||
_note_: `if input is not passed, default value will be rendered`
|
||||
|
||||
## Basic Usage
|
||||
|
||||
```ts
|
||||
@@ -50,8 +52,8 @@ 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.
|
||||
|
||||
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) {}
|
||||
@@ -79,23 +81,21 @@ dialogRef.afterClosed().subscribe((result) => {
|
||||
|
||||
### Rendering with thirdOptionLabel
|
||||
|
||||
```
|
||||
const thirdOptionLabel = "YES. DON'T SHOW IT AGAIN";
|
||||
const dialog = this.dialog.open(ConfirmDialogComponent, {
|
||||
data: {
|
||||
title: 'Upload',
|
||||
thirdOptionLabel: thirdOptionLabel,
|
||||
message: `This is the default message`
|
||||
},
|
||||
minWidth: '250px'
|
||||
});
|
||||
dialog.afterClosed().subscribe((status) => {
|
||||
// do the third option label operation
|
||||
if ( status === thirdOptionLabel) {
|
||||
// console.log('third option clicked');
|
||||
}
|
||||
});
|
||||
```
|
||||
const thirdOptionLabel = "YES. DON'T SHOW IT AGAIN";
|
||||
const dialog = this.dialog.open(ConfirmDialogComponent, {
|
||||
data: {
|
||||
title: 'Upload',
|
||||
thirdOptionLabel: thirdOptionLabel,
|
||||
message: `This is the default message`
|
||||
},
|
||||
minWidth: '250px'
|
||||
});
|
||||
dialog.afterClosed().subscribe((status) => {
|
||||
// do the third option label operation
|
||||
if ( status === thirdOptionLabel) {
|
||||
// console.log('third option clicked');
|
||||
}
|
||||
});
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -5,7 +5,7 @@ Status: Active
|
||||
Last reviewed: 2018-12-07
|
||||
---
|
||||
|
||||
# [Library dialog component](../../../lib/content-services/dialogs/library/library.dialog.ts "Defined in library.dialog.ts")
|
||||
# [Library dialog component](../../../lib/content-services/src/lib/dialogs/library/library.dialog.ts "Defined in library.dialog.ts")
|
||||
|
||||
Creates a new Content Services document library/site.
|
||||
|
||||
|
Reference in New Issue
Block a user