mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-24 17:02:55 +08:00
1 line
1.8 KiB
JavaScript
1 line
1.8 KiB
JavaScript
import{f as i,I as c,_ as m,v as p,h as u,k as f,x as o,s as _,l as s,al as l,B as v,p as h,e as b}from"./_plugin-vue_export-helper-dacf3d65.js";import{a as y}from"./runtime-dom.esm-bundler-98433118.js";const $=i({name:"simple-modal",props:{contentWidth:String},setup(e,{emit:t}){return c(()=>{document.addEventListener("keydown",n=>{n.keyCode==27&&t("close")})}),{}}});const r=e=>(h("data-v-026c1294"),e=e(),b(),e),w={class:"modal-mask"},k={class:"modal-header"},C={class:"flex justify-between"},S=r(()=>o("hr",null,null,-1)),x={class:"modal-body"},I=r(()=>o("hr",null,null,-1)),B={class:"modal-footer"},M={class:"flex justify-end"};function g(e,t,n,j,N,V){const a=p("font-awesome-icon");return u(),f("div",w,[o("div",{class:"modal-wrapper",onClick:t[3]||(t[3]=d=>e.$emit("close"))},[o("div",{onClick:t[2]||(t[2]=y(()=>{},["stop"])),class:_(["modal-container max-h-screen overflow-y-scroll",e.contentWidth?e.contentWidth:"w-1/2"])},[o("div",k,[o("div",C,[s(e.$slots,"header",{},()=>[l("default header")],!0),o("button",{onClick:t[0]||(t[0]=d=>e.$emit("close")),class:"ml-4 inline-flex items-center justify-center w-8 h-8 mr-2 text-red-500 transition-colors duration-150 bg-white rounded-full border-red-200 border focus:outline-none hover:border-red-500"},[v(a,{icon:"times"})])])]),S,o("div",x,[s(e.$slots,"body",{},()=>[l("default body")],!0)]),I,o("div",B,[s(e.$slots,"footer",{},()=>[o("div",M,[o("button",{class:"modal-default-button text-red-500 border-red-200 border rounded py-1 px-2 transition-colors hover:outline-none hover:border-red-500",onClick:t[1]||(t[1]=d=>e.$emit("close"))}," Cancel ")])],!0)])],2)])])}const z=m($,[["render",g],["__scopeId","data-v-026c1294"],["__file","/home/aurthurm/Development/felicity-lims/webapp/components/SimpleModal.vue"]]);export{z as default};
|