diff --git a/README.md b/README.md index 93ddb81..9d7f74b 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ composer require --dev markwalet/nova-modal-response ## Usage ```php -return Action::modal('code-modal', [ +return Action::modal('modal-response', [ 'title' => 'Preview Navision Payload', 'body' => 'Lorem ipsum dolor sit amed', ]); diff --git a/dist/js/asset.js b/dist/js/asset.js index 14205d1..d8f5b96 100644 --- a/dist/js/asset.js +++ b/dist/js/asset.js @@ -1 +1 @@ -(()=>{"use strict";var e={744:(e,t)=>{t.Z=(e,t)=>{const o=e.__vccOpts||e;for(const[e,n]of t)o[e]=n;return o}}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var l=t[n]={exports:{}};return e[n](l,l.exports,o),l.exports}(()=>{const e=Vue;var t={class:"flex items-center ml-auto"};const n={name:"ModalActionResponse",props:["data"],methods:{handleClose:function(){this.$emit("close")},handleConfirm:function(){this.$emit("confirm")}}};const r=(0,o(744).Z)(n,[["render",function(o,n,r,l,a,c){var s=(0,e.resolveComponent)("ModalHeader"),i=(0,e.resolveComponent)("ModalContent"),d=(0,e.resolveComponent)("CancelButton"),u=(0,e.resolveComponent)("ModalFooter"),p=(0,e.resolveComponent)("Modal");return(0,e.openBlock)(),(0,e.createBlock)(p,{onModalClose:c.handleClose,tabindex:"-1",role:"dialog",size:"2xl"},{default:(0,e.withCtx)((function(){return[(0,e.createElementVNode)("div",{onSubmit:n[1]||(n[1]=(0,e.withModifiers)((function(){return c.handleConfirm&&c.handleConfirm.apply(c,arguments)}),["prevent"])),"slot-scope":"props",class:"bg-white rounded-lg shadow-lg overflow-hidden dark:bg-gray-800 space-y-6"},[(0,e.createVNode)(s,{textContent:(0,e.toDisplayString)(r.data.title)},null,8,["textContent"]),(0,e.createVNode)(i,null,{default:(0,e.withCtx)((function(){return[(0,e.createElementVNode)("code",null,(0,e.toDisplayString)(r.data.result),1)]})),_:1}),(0,e.createVNode)(u,null,{default:(0,e.withCtx)((function(){return[(0,e.createElementVNode)("div",t,[(0,e.createVNode)(d,{component:"button",type:"button",dusk:"cancel-action-button",class:"ml-auto mr-3",onClick:n[0]||(n[0]=function(e){return o.$emit("close")})},{default:(0,e.withCtx)((function(){return[(0,e.createTextVNode)(" Cancel ")]})),_:1})])]})),_:1})],32)]})),_:1},8,["onModalClose"])}]]);Nova.booting((function(e){e.component("modal-response",r)}))})()})(); \ No newline at end of file +(()=>{"use strict";var e={744:(e,t)=>{t.Z=(e,t)=>{const o=e.__vccOpts||e;for(const[e,n]of t)o[e]=n;return o}}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var l=t[n]={exports:{}};return e[n](l,l.exports,o),l.exports}(()=>{const e=Vue;var t={class:"flex items-center ml-auto"};const n={name:"ModalActionResponse",props:["data"],methods:{handleClose:function(){this.$emit("close")},handleConfirm:function(){this.$emit("confirm")}}};const r=(0,o(744).Z)(n,[["render",function(o,n,r,l,a,c){var i=(0,e.resolveComponent)("ModalHeader"),s=(0,e.resolveComponent)("ModalContent"),d=(0,e.resolveComponent)("CancelButton"),u=(0,e.resolveComponent)("ModalFooter"),p=(0,e.resolveComponent)("Modal");return(0,e.openBlock)(),(0,e.createBlock)(p,{onModalClose:c.handleClose,tabindex:"-1",role:"dialog",size:"2xl"},{default:(0,e.withCtx)((function(){return[(0,e.createElementVNode)("div",{onSubmit:n[1]||(n[1]=(0,e.withModifiers)((function(){return c.handleConfirm&&c.handleConfirm.apply(c,arguments)}),["prevent"])),"slot-scope":"props",class:"bg-white rounded-lg shadow-lg overflow-hidden dark:bg-gray-800 space-y-6"},[(0,e.createVNode)(i,{textContent:(0,e.toDisplayString)(r.data.title)},null,8,["textContent"]),(0,e.createVNode)(s,null,{default:(0,e.withCtx)((function(){return[(0,e.createElementVNode)("code",null,(0,e.toDisplayString)(r.data.body),1)]})),_:1}),(0,e.createVNode)(u,null,{default:(0,e.withCtx)((function(){return[(0,e.createElementVNode)("div",t,[(0,e.createVNode)(d,{component:"button",type:"button",dusk:"cancel-action-button",class:"ml-auto mr-3",onClick:n[0]||(n[0]=function(e){return o.$emit("close")})},{default:(0,e.withCtx)((function(){return[(0,e.createTextVNode)(" Cancel ")]})),_:1})])]})),_:1})],32)]})),_:1},8,["onModalClose"])}]]);Nova.booting((function(e){e.component("modal-response",r)}))})()})(); \ No newline at end of file diff --git a/resources/js/components/ModalActionResponse.vue b/resources/js/components/ModalActionResponse.vue index 7ef1a24..29caefe 100644 --- a/resources/js/components/ModalActionResponse.vue +++ b/resources/js/components/ModalActionResponse.vue @@ -10,7 +10,7 @@ > - {{ data.result }} + {{ data.body }}