Skip to content

Commit

Permalink
Mostrara mensaje popup UI Magento component
Browse files Browse the repository at this point in the history
1.- se agrego script que crea un PopUp

Si quiere mas información de como integrar js puede consultar este commit ->  15c9d59
  • Loading branch information
PerezContrerasLuis committed Jan 29, 2022
1 parent 839020c commit 9a62503
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions code/Learning/Js/view/frontend/templates/hello.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,38 @@
</div>



<div id='popup-modal'>
<h1> Hi I'm here.... </h1>
</div>
<script>
require(
[
'jquery',
'Magento_Ui/js/modal/modal'
],
function(
$,
modal
) {
var options = {
type: 'popup',
responsive: true,
innerScroll: true,
title: 'popup modal title',
buttons: [{
text: $.mage.__('Continue'),
class: '',
click: function () {
this.closeModal();
}
}]
};

var popup = modal(options, $('#popup-modal'));

$('#popup-modal').modal('openModal');
}
);
</script>

0 comments on commit 9a62503

Please sign in to comment.