# ngb-confirmation-modal

> ### Installation

Latest version **0.0.5** (published 2019-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install ngb-confirmation-modal
pnpm add ngb-confirmation-modal
yarn add ngb-confirmation-modal
bun add ngb-confirmation-modal
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2019-10-28 |
| First published | 2019-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 100.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kachniarz Krzysztof |
| Maintainers | kkachniarz |
| Keywords | bootstrap, ngbootstrap, modal |

## Links

- npm: https://www.npmjs.com/package/ngb-confirmation-modal
- Repository: https://github.com/kkachniarz220/ngb-confirmation-modal
- Homepage: https://github.com/kkachniarz220/ngb-confirmation-modal#readme
- Issues: https://github.com/kkachniarz220/ngb-confirmation-modal/issues
- npm.io page: https://npm.io/package/ngb-confirmation-modal

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2019-10-28
- 0.0.4 — 2019-10-25
- 0.0.3 — 2019-10-25
- 0.0.2 — 2019-10-25
- 0.0.1 — 2019-10-25

## README

# NgbConfirmationModal

### Installation

```
npm install ngb-confirmation-modal
```

```typescript
import { NgbConfirmationModalModule } from 'ngb-confirmation-modal';

  imports: [
    NgbConfirmationModalModule,
  ],

```

### Basic usage

```html
<ngb-confirmation-modal (closeResult)="onConfirmationModalResult($event)" [openModalFlag]="openConfirmationModal">

  <ng-template ngbConfirmationModalHeader>
    Modal header
  </ng-template>

  <ng-template ngbConfirmationModalBody>
    Modal body
  </ng-template>

</ngb-confirmation-modal>
```

### Input

| Input   |      Type      |  Default value  |
|----------|:-------------:|------:|
| [confirmButtonColor] |  text | primary |
| [confirmButtonText] |    text   |   Confirm |
| [cancelButtonColor] |  text | secondary |
| [cancelButtonText] |    text   |   Cancel |
| [openModalFlag] | boolean |    false |

- `confirmButtonColor`: Bootstrap color of confirmation button.
- `confirmButtonText`: Confirmation button text.
- `cancelButtonColor`: Bootstrap color of cancel button.
- `cancelButtonText`: Cancel button text.
- `openModalFlag`: If you set to `true` modal will open.
###### Available colors:

- primary
- warning
- secondary
- danger
- success
- info
- dark
- light
- muted
- white
<hr>

### Output

| Output   |      Returned type |
|----------|:-------------:|
| (closeResult) | boolean |
 
- `Confirm button click`: returned value: `true`
- `Cancel button click`: returned value: `false`


<hr>

#### Templates

###### Modal header
- confirmationModalHeader (default value: `Confirmation`)
```html
<ngb-confirmation-modal>

  <ng-template ngbConfirmationModalHeader>
    Confirmation about user delete
  </ng-template>

</ngb-confirmation-modal>
```
###### Modal body
- confirmationModalBody (default value: `Are you sure?`)
```html
<ngb-confirmation-modal>

  <ng-template ngbConfirmationModalBody>
    Are you sure you want to delete a user?
  </ng-template>

</ngb-confirmation-modal>
```

---
_Source: https://npm.io/package/ngb-confirmation-modal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
