aboutsummaryrefslogtreecommitdiff
path: root/src/site/components/statistics/detailed.vue
blob: 0d93e9acfd9fca4d39c979e5fdb8f8f9c12fc9aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<template>
	<div>
		<div class="columns is-mobile">
			<div class="column is-2">
				{{ title }}
			</div>
			<div class="column">
				<b-table v-if="data.length" :data="data || []" :mobile-cards="true" narrowed class="details">
					<b-table-column v-slot="props" field="type" label="Type">
						{{ props.row.key }}
					</b-table-column>
					<b-table-column v-slot="props" field="count" label="Count">
						{{ props.row.value }}
					</b-table-column>
				</b-table>
				<template v-else>
					-
				</template>
			</div>
		</div>
	</div>
</template>
<script>
export default {
	props: {
		title: {
			'type': String,
			'default': null
		},
		data: {
			'type': Array,
			'default': () => []
		}
	}
};
</script>
<style lang="scss" scoped>
	.details ::v-deep .table-wrapper {
		box-shadow: none;

		.table {
			border-radius: unset;
			background: #2A2E3C;
		}
	}
</style>