Skip to content

Commit

Permalink
docs: ✏️ update README
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharkazaz committed Nov 13, 2023
1 parent b852ea3 commit 9c8c220
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ export class MyVeryCommonDialogComponent {

constructor() {
this.ref.updateConfig({
id: 'my-very-common-dialog'
height: '200px',
width: '400px',
});
}
}
Expand Down Expand Up @@ -299,7 +300,9 @@ bootstrapApplication(AppComponent, {

For each dialog instance you open you can specify all the global options and also the following 3 options.

- `id` - The modal unique id (defaults to random id).
- `id` - The modal's unique id, the defaults are:
- If a component is passed - the component's name (e.g. `MyCustomDialog`).
- Otherwise, a random id is given.
> [!Note]
> while not required, it is recommended to set it to prevent unwanted multiple instances of the same dialog.
- `vcr` - A custom `ViewContainerRef` to use.
Expand Down
19 changes: 11 additions & 8 deletions libs/dialog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ import { DialogService, DialogRef } from '@ngneat/dialog';
})
export class MyVeryCommonDialogComponent {
ref: DialogRef<Data> = inject(DialogRef);

constructor() {
this.ref.updateConfig({
id: 'my-very-common-dialog'
height: '200px',
width: '400px',
});
}
}
Expand Down Expand Up @@ -299,7 +300,9 @@ bootstrapApplication(AppComponent, {

For each dialog instance you open you can specify all the global options and also the following 3 options.

- `id` - The modal unique id (defaults to random id).
- `id` - The modal's unique id, the defaults are:
- If a component is passed - the component's name (e.g. `MyCustomDialog`).
- Otherwise, a random id is given.
> [!Note]
> while not required, it is recommended to set it to prevent unwanted multiple instances of the same dialog.
- `vcr` - A custom `ViewContainerRef` to use.
Expand Down Expand Up @@ -339,21 +342,21 @@ The default `sizes` config is:
sizes: {
sm: {
height: 'auto',
width: '400px',
width: '400px',
},
md: {
height: 'auto',
width: '560px',
width: '560px',
},
lg: {
height: 'auto',
width: '800px',
width: '800px',
},
fullScreen: {
height: '100%',
width: '100%',
width: '100%',
},
}
}
}
```

Expand Down

0 comments on commit 9c8c220

Please sign in to comment.