storj/web/satellite/src/components/common/PagesBlock.vue
VitaliiShpital 506582e208 web/satellite: project overview page removed, dashboard page implemented
Change-Id: Id56425fe38296250e5814a0f02a554cdd73b2330
2020-03-26 17:15:14 +00:00

81 lines
1.9 KiB
Vue

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="pages-container">
<span
class="pages-container__pages"
v-for="page in pages"
:class="{'selected': isSelected(page.index)}"
@click="page.select()"
:key="page.index">{{page.index}}</span>
</div>
</template>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';
import { Page } from '@/types/pagination';
@Component
export default class PagesBlock extends Vue {
@Prop({default: () => []})
public readonly pages: Page[];
@Prop({default: () => false})
public readonly isSelected: CheckSelected;
}
</script>
<style scoped lang="scss">
.pages-container {
display: flex;
&__pages {
font-family: 'font_medium', sans-serif;
font-size: 16px;
margin-right: 15px;
width: auto;
text-align: center;
cursor: pointer;
display: block;
position: relative;
transition: all 0.2s ease;
&:hover {
color: #2379ec;
&:after {
content: '';
display: block;
position: absolute;
bottom: -4px;
left: 0;
width: 100%;
height: 2px;
background-color: #2379ec;
}
}
&:last-child {
margin-right: 0;
}
}
}
.selected {
color: #2379ec;
font-family: 'font_bold', sans-serif;
&:after {
content: '';
display: block;
position: absolute;
bottom: -4px;
left: 0;
width: 100%;
height: 2px;
background-color: #2379ec;
}
}
</style>