Skip to content

Commit

Permalink
Added opacity transition to close button
Browse files Browse the repository at this point in the history
  • Loading branch information
Albermonte authored and sisou committed Oct 31, 2023
1 parent a1ed7b2 commit 9b1bcc4
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/components/SearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,18 @@
@focus="handleFocus"
@blur="handleBlur"
/>
<CrossCloseButton
class="cross-close-button"
v-if="isInputActive"
@click="handleClose"
/>
<transition name="fade">
<CrossCloseButton
class="cross-close-button"
v-if="isInputActive"
@click="handleClose"
/>
</transition>
</div>
</template>

<script lang="ts">
import { defineComponent, ref, onMounted, onUnmounted, computed, watch } from '@vue/composition-api';
import { defineComponent, ref, onMounted, onUnmounted, computed } from '@vue/composition-api';
import CrossCloseButton from './CrossCloseButton.vue';
Expand Down Expand Up @@ -237,6 +239,10 @@ input {
cursor: pointer;
}
.fade-enter-active, .fade-leave-active {
transition-duration: var(--attr-duration);
}
@media (min-width: 700px) and (max-width: 900px) {
.cover-all {
&:focus-within {
Expand Down

0 comments on commit 9b1bcc4

Please sign in to comment.