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.
134 lines
3.7 KiB
134 lines
3.7 KiB
<template>
|
|
<div :class="`slide-button ${theme}`">
|
|
<div class="overlay"></div>
|
|
<div v-if="prepend_icon != ''" class="back-label">
|
|
<v-icon>WMi-{{ prepend_icon }}</v-icon>
|
|
</div>
|
|
<div class="name">
|
|
<div class="Fa"> {{ title_fa }} </div>
|
|
<div class="En"> {{ title_en }} </div>
|
|
</div>
|
|
<div v-if="append_icon != ''" class="left-icon">
|
|
<v-icon>WMi-{{ append_icon }}</v-icon>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
props: {
|
|
theme: {default: 'theme-black'},
|
|
prepend_icon: {default: ''},
|
|
append_icon: {default: ''},
|
|
title_fa: {default: 'عنوان دکمه'},
|
|
title_en: {default: 'Button Title'},
|
|
},
|
|
}
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.slide-button {
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 5px 65px 5px 45px;
|
|
min-width: 200px;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
margin-bottom: 10px;
|
|
-webkit-transform: translateZ(0);
|
|
transform: translateZ(0);
|
|
-webkit-transition: all 1000ms;
|
|
transition: all 1000ms;
|
|
color: #383838;
|
|
text-align: right;
|
|
border-radius: 5px;
|
|
}
|
|
.slide-button .back-label {
|
|
position: absolute;
|
|
right: 15px;
|
|
}
|
|
.slide-button .left-icon {
|
|
margin-right: 30px;
|
|
}
|
|
.slide-button .left-icon .v-icon, .slide-button .back-label .v-icon {
|
|
font-size: 32px;
|
|
color: var(--color-white);
|
|
transition: color 0.3s;
|
|
}
|
|
.slide-button .name {
|
|
color: var(--color-white);
|
|
transition: color 0.3s;
|
|
}
|
|
.slide-button .name .Fa {
|
|
font-size: 18px;
|
|
}
|
|
.slide-button .name .En {
|
|
font-size: 12px;
|
|
letter-spacing: 3px;
|
|
opacity: 0.8;
|
|
text-transform: uppercase;
|
|
margin-right: -3px;
|
|
margin-top: -3px;
|
|
}
|
|
.slide-button:before {
|
|
content: "";
|
|
position: absolute;
|
|
z-index: -1;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: var(--color-black);
|
|
-webkit-transform: scaleX(0);
|
|
transform: scaleX(0);
|
|
-webkit-transform-origin: 100% 50%;
|
|
transform-origin: 100% 50%;
|
|
-webkit-transition-property: transform;
|
|
transition-property: transform;
|
|
-webkit-transition: 300ms cubic-bezier(1, 0, 0, 1);
|
|
transition: 300ms cubic-bezier(1, 0, 0, 1);
|
|
border-radius: 5px;
|
|
}
|
|
|
|
|
|
/*----------------------------------------------------*/
|
|
/* Colors */
|
|
/*----------------------------------------------------*/
|
|
@import "resources/js/Global/scss/_vars.scss";
|
|
@each $color,
|
|
$value in $colors {
|
|
.slide-button.theme-#{$color} {
|
|
background-color: $value;
|
|
}
|
|
}
|
|
@each $shadow,
|
|
$value in $Shadows {
|
|
.slide-button.theme-#{$shadow} {
|
|
-webkit-box-shadow: 0 10px 30px 0px $value;
|
|
}
|
|
}
|
|
|
|
/*----------------------------------------------------*/
|
|
/* Hover State */
|
|
/*----------------------------------------------------*/
|
|
.slide-button:hover {
|
|
-webkit-box-shadow: 0 10px 30px 0px rgba(255, 255, 255, 0.2) !important;
|
|
}
|
|
.slide-button:hover:before {
|
|
-webkit-transform: scaleX(1);
|
|
transform: scaleX(1);
|
|
}
|
|
.slide-button:hover .name {
|
|
color: var(--color-white);
|
|
}
|
|
.slide-button:hover .left-icon .v-icon, .slide-button:hover .back-label .v-icon {
|
|
color: var(--color-white);
|
|
}
|
|
|
|
.slide-button.flat {
|
|
-webkit-box-shadow: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
|
|
</style>
|