mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-10-31 19:17:48 +00:00 
			
		
		
		
	 7bb8186e43
			
		
	
	7bb8186e43
	
	
	
		
			
			* chore: Fix self-closing tag issues * Fix merge conflicts Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
		
			
				
	
	
		
			45 lines
		
	
	
		
			738 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			738 B
		
	
	
	
		
			Vue
		
	
	
	
	
	
| <template>
 | |
|   <button :type="type" class="button nice" :class="variant" @click="onClick">
 | |
|     <fluent-icon
 | |
|       v-if="!isLoading && icon"
 | |
|       class="icon"
 | |
|       :class="buttonIconClass"
 | |
|       :icon="icon"
 | |
|     />
 | |
|     <spinner v-if="isLoading" />
 | |
|     <slot />
 | |
|   </button>
 | |
| </template>
 | |
| 
 | |
| <script>
 | |
| export default {
 | |
|   props: {
 | |
|     isLoading: {
 | |
|       type: Boolean,
 | |
|       default: false,
 | |
|     },
 | |
|     icon: {
 | |
|       type: String,
 | |
|       default: '',
 | |
|     },
 | |
|     buttonIconClass: {
 | |
|       type: String,
 | |
|       default: '',
 | |
|     },
 | |
|     type: {
 | |
|       type: String,
 | |
|       default: 'button',
 | |
|     },
 | |
|     variant: {
 | |
|       type: String,
 | |
|       default: 'primary',
 | |
|     },
 | |
|   },
 | |
|   methods: {
 | |
|     onClick(e) {
 | |
|       this.$emit('click', e);
 | |
|     },
 | |
|   },
 | |
| };
 | |
| </script>
 |