mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 19:17:48 +00:00 
			
		
		
		
	Move src to dashboard (#152)
This commit is contained in:
		
							
								
								
									
										33
									
								
								app/javascript/dashboard/components/Modal.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								app/javascript/dashboard/components/Modal.vue
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| <template> | ||||
|   <transition name="modal-fade"> | ||||
|     <div class="modal-mask" @click="close" v-if="show" transition="modal"> | ||||
|       <div class="modal-container" :class="className" @click.stop> | ||||
|         <i class="ion-android-close modal--close" @click="close"></i> | ||||
|         <slot></slot> | ||||
|       </div> | ||||
|     </div> | ||||
|   </transition> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|  | ||||
| export default { | ||||
|   props: { | ||||
|     show: Boolean, | ||||
|     onClose: Function, | ||||
|     className: String, | ||||
|   }, | ||||
|   methods: { | ||||
|     close() { | ||||
|       this.onClose(); | ||||
|     }, | ||||
|   }, | ||||
|   mounted() { | ||||
|     document.addEventListener('keydown', (e) => { | ||||
|       if (this.show && e.keyCode === 27) { | ||||
|         this.onClose(); | ||||
|       } | ||||
|     }); | ||||
|   }, | ||||
| }; | ||||
| </script> | ||||
		Reference in New Issue
	
	Block a user
	 Pranav Raj S
					Pranav Raj S