feat: add animations to Playground elements
This commit is contained in:
parent
93a71bfbd3
commit
1e261eb3ec
@ -72,16 +72,11 @@ const disabledMap = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const showMap = ref({} as { [key: string]: boolean})
|
const showMap = ref({} as { [key: string]: boolean})
|
||||||
|
sources.forEach((source, index) => {
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
for (const source of sources) {
|
|
||||||
showMap.value[source.id] = true
|
showMap.value[source.id] = true
|
||||||
}
|
}, 1000 + index * 250)
|
||||||
}, 1000)
|
})
|
||||||
window.setTimeout(() => {
|
|
||||||
for (const source of sources) {
|
|
||||||
showMap.value[source.id] = false
|
|
||||||
}
|
|
||||||
}, 3000)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -32,7 +32,7 @@ const containerClasses = computed(() => {
|
|||||||
'source-card__container__selectable': props.selectable,
|
'source-card__container__selectable': props.selectable,
|
||||||
'source-card__container__selected': props.selected,
|
'source-card__container__selected': props.selected,
|
||||||
'source-card__container__showBadge': props.badge,
|
'source-card__container__showBadge': props.badge,
|
||||||
'source-card__container__disabled': props.disabled,
|
'source-card__container__disabled': props.disabled && props.show,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@ -57,11 +57,12 @@ const containerClasses = computed(() => {
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -40px;
|
top: -40px;
|
||||||
transition: opacity 1s linear, top 1s cubic-bezier(0.2, 2, 0.7, 1.5);
|
transition: opacity 1s linear, top 999s;
|
||||||
|
|
||||||
&__show {
|
&__show {
|
||||||
opacity: 100%;
|
opacity: 100%;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
transition: opacity 1s linear, top 1s cubic-bezier(0.2, 2, 0.7, 1.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
&__selectable {
|
&__selectable {
|
||||||
|
Loading…
Reference in New Issue
Block a user