# j-Approve

> j-Approve: jednoduché použitie; singleton

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: sk
Content-SHA256: 0854cff1dcb9a7d16a1a80d0e299279cbd7009405be2517c96cb5705c0933866
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

- singleton
- funguje s Bootstrap
- podporuje __tmavý režim__
- modálny

__Konfigurácia__:

- `cancel` {String} označenie pre tlačidlo zrušenia (predvolené: `Cancel`)
- __NEW__: `style` {číslo} zmení štýl (podporovaný štýl `1` (predvolené) a `2`)

__Metódy__:

- `component.show(message, approve_button_label, [cancel_button_label], callback, [callback_cancel])`

__Použitie__:

```js
SETTER('approve/show', message, 'Yes', function() {

});
```

## Jednoduchý štýl tlačidiel

```js
// "Remove" button will be with Font-Awesome icon called: "trash-o"
SETTER('approve/show', 'Are you sure you want to remove selected item?', ':trash-o: Remove', REMOVE_FUNCTION);

// "Confirm" button will be "green" with Font-Awesome icon called: "checked-circle"
SETTER('approve/show', 'Are you sure you want to confirm selected items?', ':checked-circle: Confirm #2BA433', REMOVE_FUNCTION);
```

Použite ho so `<ui-component name="approve">`. Keď komponent ešte nie je načítaný, jComponent ho stiahne pri prvom použití z adresy v `DEF.fallback` (predvolene CDN Componentator). Autor: Peter Širka. Zdroj: úložisko komponentov Componentator, licencia MIT.

```html example.html
<ui-component name="approve"></ui-component>

<script>
	SETTER(true, 'approve/show', 'Do you want to remove React/Vue/Angular.js from your device?', ':check-circle: OK', function() {
		alert('Thank you for using of jComponent library');
	});
</script>
```
