# j-Approve

> j-Approve: Lätt att använda; singleton

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

- singlar
- Arbeta med Bootstrap
- Stöd för _dark mode_
- Modellt

__Konfigurera__:

- `cancel` {String} en etikett för att avbryta knappen (default: `Cancel`)
- __NEW__: `style` {Number} ändrar stil (stödda stil `1` (default) och `2`)

__Metoder__:

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

__Användning__:

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

});
```

## En enkel styling av knappar

```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);
```

Använd den med `<ui-component name="approve">`När komponenten ännu inte är laddad, jComponent Ladda ner den första gången från adressen i `DEF.fallback` (en av Componentator Författare: Peter Širka. källa: The Componentator Komponenterna i lager, MIT licens.

```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>
```
