You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
willaengine/resources/js/Global/components/Inputs/Quantity-Select.vue

99 lines
2.3 KiB

<template>
<div :class="`quantity-select ${theme}`">
<div class="controls">
<div class="add">
<v-icon color="cyan">WMi-plus</v-icon>
</div>
<div class="reduce">
<v-icon color="red">WMi-minus</v-icon>
</div>
</div>
<div class="value En Bold">
<div class="number"> {{ quantity }} </div>
<div class="unit Fa Thin"> {{ label }} </div>
</div>
</div>
</template>
<script>
export default {
props: {
theme: { default: '' },
quantity: { default: '' },
label: { default: 'نام فارسی' },
},
};
</script>
<style lang="scss" scoped>
.quantity-select {
width: 100%;
padding: 0px 5px;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
}
.quantity-select .v-icon {
font-size: 30px;
opacity: 0.7;
cursor: pointer;
}
.quantity-select .value {
padding: 0px 0px 0px 0px;
margin-top: 0px;
font-size: 35px;
line-height: 30px;
color: var(--color-black);
margin-top: -2px;
}
.quantity-select .value .unit {
font-size: 12px;
line-height: 16px;
/*margin-top: 8px;*/
}
.quantity-select .v-icon:hover {
opacity: 1;
}
.quantity-select .controls .add {
display: block;
}
.quantity-select .controls .reduce {
display: block;
margin-top: -10px;
margin-right: 1px;
}
/*----------------------------------------------------*/
/* SM Size */
/*----------------------------------------------------*/
.quantity-select.sm .v-icon {
font-size: 25px;
}
.quantity-select.sm .value {
font-size: 40px;
}
.quantity-select.sm .value .unit {
display: none;
}
.quantity-select.sm .value {
padding-top: 0px;
margin-top: 0px;
}
.quantity-select.sm .controls .add {
display: block;
margin-bottom: -10px;
margin-top: 5px;
}
.quantity-select.sm .controls .reduce {
display: block;
margin-top: 3px;
margin-right: 1px;
}
</style>