💫 (button) finish button fade animation
This commit is contained in:
@@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="interval-input">
|
<div class="interval-input">
|
||||||
<transition name="fade" mode="out-in">
|
<transition name="fade" mode="out-in">
|
||||||
<button v-show="editable" @click="minus">
|
<button v-if="editable" class="spacer" @click="minus">
|
||||||
<img key="minus" src="@/assets/minus.svg" alt="minus" />
|
<img key="minus" src="@/assets/minus.svg" alt="minus" />
|
||||||
</button>
|
</button>
|
||||||
|
<div v-else class="spacer"></div>
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="fade" mode="out-in">
|
|
||||||
<h3>{{ label }}</h3>
|
<h3>{{ label }}</h3>
|
||||||
</transition>
|
|
||||||
<transition name="fade" mode="out-in">
|
<transition name="fade" mode="out-in">
|
||||||
<button v-show="editable" @click="plus">
|
<button v-if="editable" class="spacer" @click="plus">
|
||||||
<img key="plus" src="@/assets/plus.svg" alt="plus" />
|
<img key="plus" src="@/assets/plus.svg" alt="plus" />
|
||||||
</button>
|
</button>
|
||||||
|
<div v-else class="spacer"></div>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -30,10 +30,10 @@ export default defineComponent({
|
|||||||
|
|
||||||
const label = computed(() => {
|
const label = computed(() => {
|
||||||
if (interval.value === minInterval) {
|
if (interval.value === minInterval) {
|
||||||
return '30s session'
|
return '30 second session'
|
||||||
}
|
}
|
||||||
|
|
||||||
return `${interval.value}min session`
|
return `${interval.value} minute session`
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -53,16 +53,23 @@ $button-size: 50px;
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
|
||||||
|
h3 {
|
||||||
|
flex: 1;
|
||||||
|
line-height: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 0 1rem;
|
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spacer {
|
||||||
width: $button-size;
|
width: $button-size;
|
||||||
height: $button-size;
|
height: $button-size;
|
||||||
|
margin: 0 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -24,21 +24,21 @@
|
|||||||
v-if="timeState === 'stopped'"
|
v-if="timeState === 'stopped'"
|
||||||
src="@/assets/play.svg"
|
src="@/assets/play.svg"
|
||||||
alt="play"
|
alt="play"
|
||||||
width="44px"
|
width="50px"
|
||||||
height="44px"
|
height="50px"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
key="pause"
|
key="pause"
|
||||||
v-if="timeState === 'started'"
|
v-if="timeState === 'started'"
|
||||||
src="@/assets/pause.svg"
|
src="@/assets/pause.svg"
|
||||||
alt="pause"
|
alt="pause"
|
||||||
width="44px"
|
width="50px"
|
||||||
height="44px"
|
height="50px"
|
||||||
/>
|
/>
|
||||||
</transition>
|
</transition>
|
||||||
</button>
|
</button>
|
||||||
<button @click="clear">
|
<button @click="clear">
|
||||||
<img src="@/assets/stop.svg" alt="stop" />
|
<img src="@/assets/stop.svg" alt="stop" width="50px" height="50px" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<ZoneMusic
|
<ZoneMusic
|
||||||
|
|||||||
Reference in New Issue
Block a user