ForgeKomponenty
sk

Komponenty

j-Approve

jComponent 20 · jcomponent@20 component Príklad načítaný s jComponent 20
  • 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:

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

});

Jednoduchý štýl tlačidiel

// "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.

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>