ForgeComponents
en

Components

j-Approve

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20
  • singleton
  • works with Bootstrap
  • supports dark mode
  • modal

Configuration:

  • cancel {String} a label for cancel button (default: Cancel)
  • NEW: style {Number} changes style (supported style 1 (default) and 2)

Methods:

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

Usage:

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

});

A simple styling of buttons

// "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);

Use it with <ui-component name="approve">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

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>