mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-03 20:48:07 +00:00 
			
		
		
		
	Co-authored-by: Shivam Mishra <scm.mymail@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
		
			
				
	
	
		
			48 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Vue
		
	
	
	
	
	
<script setup>
 | 
						|
import Button from './button/Button.vue';
 | 
						|
defineProps({
 | 
						|
  title: {
 | 
						|
    type: String,
 | 
						|
    required: true,
 | 
						|
  },
 | 
						|
  buttons: {
 | 
						|
    type: Array,
 | 
						|
    default: () => [],
 | 
						|
  },
 | 
						|
});
 | 
						|
 | 
						|
const emit = defineEmits(['click', 'close']);
 | 
						|
 | 
						|
const handleButtonClick = button => {
 | 
						|
  emit('click', button.key);
 | 
						|
};
 | 
						|
</script>
 | 
						|
 | 
						|
<template>
 | 
						|
  <div
 | 
						|
    class="flex items-center justify-between px-4 py-2 border-b border-n-weak h-12"
 | 
						|
  >
 | 
						|
    <div class="flex items-center justify-between gap-2 flex-1">
 | 
						|
      <span class="font-medium text-sm text-n-slate-12">{{ title }}</span>
 | 
						|
      <div class="flex items-center">
 | 
						|
        <Button
 | 
						|
          v-for="button in buttons"
 | 
						|
          :key="button.key"
 | 
						|
          v-tooltip="button.tooltip"
 | 
						|
          :icon="button.icon"
 | 
						|
          ghost
 | 
						|
          sm
 | 
						|
          @click="handleButtonClick(button)"
 | 
						|
        />
 | 
						|
        <Button
 | 
						|
          v-tooltip="$t('GENERAL.CLOSE')"
 | 
						|
          icon="i-lucide-x"
 | 
						|
          ghost
 | 
						|
          sm
 | 
						|
          @click="$emit('close')"
 | 
						|
        />
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
  </div>
 | 
						|
</template>
 |