2020-01-29 13:37:25 -06:00
|
|
|
<template>
|
2021-04-16 09:04:25 -05:00
|
|
|
<div class="yxspomdl" :class="{ inline, colored }">
|
2020-02-10 05:44:59 -06:00
|
|
|
<div class="ring"></div>
|
2020-01-29 13:37:25 -06:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-10-17 06:12:00 -05:00
|
|
|
import { defineComponent } from 'vue';
|
2020-01-29 13:37:25 -06:00
|
|
|
|
2020-10-17 06:12:00 -05:00
|
|
|
export default defineComponent({
|
2020-02-11 11:52:37 -06:00
|
|
|
props: {
|
|
|
|
inline: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false
|
2021-04-16 09:04:25 -05:00
|
|
|
},
|
|
|
|
colored: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: true
|
2020-02-11 11:52:37 -06:00
|
|
|
}
|
|
|
|
}
|
2020-01-29 13:37:25 -06:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2020-02-10 05:44:59 -06:00
|
|
|
@keyframes ring {
|
|
|
|
0% {
|
|
|
|
transform: rotate(0deg);
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform: rotate(360deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-29 13:37:25 -06:00
|
|
|
.yxspomdl {
|
|
|
|
padding: 32px;
|
|
|
|
text-align: center;
|
2021-04-16 09:04:25 -05:00
|
|
|
cursor: wait;
|
|
|
|
|
|
|
|
&.colored {
|
|
|
|
color: var(--accent);
|
|
|
|
}
|
2020-01-29 13:37:25 -06:00
|
|
|
|
2020-02-11 11:52:37 -06:00
|
|
|
&.inline {
|
|
|
|
display: inline;
|
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
> .ring:after {
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
}
|
2021-04-16 09:04:25 -05:00
|
|
|
|
|
|
|
> .ring {
|
|
|
|
&:before,
|
|
|
|
&:after {
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
}
|
|
|
|
}
|
2020-02-11 11:52:37 -06:00
|
|
|
}
|
|
|
|
|
2020-02-10 05:44:59 -06:00
|
|
|
> .ring {
|
2021-04-16 09:04:25 -05:00
|
|
|
position: relative;
|
2020-02-10 05:44:59 -06:00
|
|
|
display: inline-block;
|
2020-02-11 11:35:03 -06:00
|
|
|
vertical-align: middle;
|
2020-02-10 05:44:59 -06:00
|
|
|
|
2021-04-16 09:04:25 -05:00
|
|
|
&:before,
|
|
|
|
&:after {
|
|
|
|
content: " ";
|
|
|
|
display: block;
|
|
|
|
box-sizing: border-box;
|
|
|
|
width: 48px;
|
|
|
|
height: 48px;
|
|
|
|
border-radius: 50%;
|
|
|
|
border: solid 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:before {
|
|
|
|
border-color: currentColor;
|
|
|
|
opacity: 0.3;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
border-color: currentColor transparent transparent transparent;
|
|
|
|
animation: ring 0.5s linear infinite;
|
|
|
|
}
|
2020-01-29 13:37:25 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|