diff options
Diffstat (limited to 'components/base/ItemStack/ItemStackFormOptionLabel.vue')
| -rw-r--r-- | components/base/ItemStack/ItemStackFormOptionLabel.vue | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/components/base/ItemStack/ItemStackFormOptionLabel.vue b/components/base/ItemStack/ItemStackFormOptionLabel.vue new file mode 100644 index 0000000..ab067f8 --- /dev/null +++ b/components/base/ItemStack/ItemStackFormOptionLabel.vue @@ -0,0 +1,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>
\ No newline at end of file |
