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/Blocks/Icon.vue

113 lines
2.7 KiB

<template>
4 years ago
<div :class="`we-icon ${theme}`">
<div class="icon"> <v-icon> WMi-{{icon}} </v-icon> </div>
4 years ago
<div class="label Fa">
4 years ago
<div v-if="label" v-html="label"></div>
4 years ago
<div class="value Fa" v-html="value"></div>
</div>
</div>
</template>
<script>
export default {
props: {
theme: { default: 'theme-red' },
4 years ago
label: String,
value: { default: " مقدار " },
icon: { default: 'ok' },
},
};
</script>
<style lang="scss" scoped>
/*---------------------------------------------------------------*/
/* Qunatity :: Begin*/
/*---------------------------------------------------------------*/
4 years ago
.we-icon {
transition: 0.2s;
border: 1px solid transparent;
border-radius: 5px;
padding: 5px;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
4 years ago
.we-icon .icon .v-icon {
font-size: 40px;
margin-left: -5px;
line-height: 45px;
}
4 years ago
.we-icon .label {
4 years ago
font-size: 12px;
text-align: right;
line-height: 16px;
margin-right: 3px;
4 years ago
margin-bottom: 2px;
opacity: 0.7;
}
4 years ago
.we-icon .value {
4 years ago
font-size: 16px;
4 years ago
}
4 years ago
/*----------------------------------------------------*/
/* Sizes */
/*----------------------------------------------------*/
.we-icon.sm .v-icon {
font-size: 30px;
line-height: 20px;
}
.we-icon.sm .value {
font-size: 14px;
line-height: 16px;
}
.we-icon.sm .label {
font-size: 10px;
line-height: 12px;
}
4 years ago
.we-icon.sm .label {
font-size: 12px;
text-align: right;
line-height: 14px;
margin-right: 3px;
}
4 years ago
.we-icon.xl .v-icon {
font-size: 60px;
line-height: 50px;
}
4 years ago
.we-icon.xl .label {
font-size: 15px;
text-align: right;
line-height: 18px;
margin-right: 3px;
margin-top: 4px;
}
4 years ago
.we-icon.variation {
padding: 5px 10px;
background-color: #eeeeee;
border-radius: 3px;
color: var(--color-store-order);
}
/*---------------------------------------------------------------*/
/* Qunatity :: End*/
/*---------------------------------------------------------------*/
4 years ago
@import "resources/js/Global/scss/_vars.scss";
@each $color,
$value in $colors {
.we-icon.theme-#{$color} .v-icon {
color: $value;
}
.we-icon.theme-#{$color} .value {
color: $value;
}
}
</style>