aboutsummaryrefslogtreecommitdiffstats
path: root/components/base/ItemStack/ItemStackFormOptionLabel.vue
blob: ab067f8965cf3fca3428e83a6dbe1ca82682588b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<script setup lang="ts">
defineProps<{
  option: string
  label: string
  type: string
  isOptionSetFn: (option: string) => boolean;
  removeOptionFn: (option: string) => void;
  setOptionFn: (option: string, type: any) => void;
}>()
</script>

<template>
  <div class="label-with-button">
    <label :for="'itemstack-' + option">{{ label }}</label>

    <Button v-if="isOptionSetFn(option)" label="Remove" :icon="['fas', 'minus']"
      @click="removeOptionFn(option)"></Button>
  </div>
</template>

<style scoped>
.label-with-button {
  display: flex;
  justify-content: space-between;
}
</style>