<template>
  <div class="wrapper">
    <div class="text text-tip-1">{{ tagName }}</div>
    <div class="icon" @click="handleClose">
      <img src="./close.svg" alt="">
    </div>
  </div>
</template>

<script setup>

const props = defineProps({
  tagName: {
    type: String,
    default: ''
  }
})

const emit = defineEmits(['close'])

const handleClose = () => {
  emit('close')
}

</script>

<style lang="scss" scoped>
.wrapper{
  height: 30px;
  box-sizing: border-box;
  display: flex;
  padding: 3px 4px 3px 8px;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  border-radius: 4px;
  border: 1px solid var(--color-primary-35);
  background: var(--color-primary-2);
  cursor: pointer;
  .text{
    color: var(--color-primary-100);
  }
  .icon{
    width: 15px;
    height: 15px;
    img{
      width: 100%;
      height: 100%;
    }
  }
}
</style>