# j-NativeNotifications

> j-NativeNotifications: snadné použití; singleton

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

- singleton


__Konfigurace__

- `timeout {Number}` musí obsahovat časový limit (milisekundy) pro uplynutí oznámení (předvolené: `8000`)
- `icon {String}` (volitelné) ikona (předvolené `/icon.png`)

__Metody__
- `component.append(title, message, [callback], [icon])` pro vytvoření nové oznámení

__Použití__

```javascript
SETTER('nativenotifications/show', 'TITLE', 'MESSAGE', function() {
    // optional, click
}, '/img/warning-optional.png');
```

Použijte ji s `<ui-component name="nativenotifications">`Pokud je součástka ještě nezačleněna, jComponent Stáhnout ji na první použití z adresy `DEF.fallback` a) The Componentator CDN dle předvolby. autor: Peter Širka. zdroj: Componentator Výrobce je autorizován, MIT licence.

```html example.html
<ui-component name="nativenotifications" path="allowNotifications"></ui-component>

<script>
	var allowNotifications = true;

	setTimeout(function() {
		SETTER('nativenotifications/append', 'Hello!', 'jComponent is a great solution for everyone.', null, 'https://messenger.totaljs.com/icon.png');
	}, 3000);
</script>
```
