storj/web/satellite/src/components/common/VerticalArrows.vue
Egon Elbre 0889866b17 web/: add @vue/component annotations
Some linters do not work properly without those annotations.
This was done with a batch replace.

Also needed to turn off two lint rules, they will be re-enabled in the
followup change. This way the batch change can be clearly separated from
manual modifications.

Change-Id: I891ae09689520edaba5588c1f2206766db2d2b90
2021-08-31 21:25:49 +03:00

58 lines
1.4 KiB
Vue

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="container">
<TopArrowIcon :class="{ active: isActive && isTop }" />
<BottomArrowIcon :class="{ active: isActive && isBottom }" />
</div>
</template>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';
import BottomArrowIcon from '@/../static/images/common/bottomArrow.svg';
import TopArrowIcon from '@/../static/images/common/topArrow.svg';
import { SortingDirectionEnum } from '@/types/sortingArrows';
// @vue/component
@Component({
components: {
TopArrowIcon,
BottomArrowIcon,
},
})
export default class VerticalArrows extends Vue {
@Prop({default: false})
private isActive: boolean;
@Prop({default: SortingDirectionEnum.BOTTOM})
private direction: SortingDirectionEnum;
public get isTop(): boolean {
return this.direction === SortingDirectionEnum.TOP;
}
public get isBottom(): boolean {
return this.direction === SortingDirectionEnum.BOTTOM;
}
}
</script>
<style scoped lang="scss">
.container {
display: flex;
flex-direction: column;
margin-left: 10px;
justify-content: space-between;
height: 17px;
}
.active {
.arrow-svg-path {
fill: #2683ff !important;
}
}
</style>