removed useless list component

This commit is contained in:
Axolotle 2020-07-12 19:20:18 +02:00
parent 88d7b736e2
commit af244e109c
3 changed files with 21 additions and 45 deletions

View file

@ -1,30 +0,0 @@
<template>
<b-list-group-item v-bind:to="uri">
<icon v-bind:iname="icon" class="fa-fw"/>
<h2><slot></slot></h2>
<icon iname="chevron-right" class="fa-fw fs-sm ml-auto"/>
</b-list-group-item>
</template>
<script>
export default {
props: {
uri: String,
icon: String,
}
}
</script>
<style lang="scss" scoped>
.list-group-item {
padding: 0.75rem 0;
display: flex;
align-items: center;
}
h2 {
font-size: 1.25rem;
font-weight: 400;
margin: 0;
}
</style>

View file

@ -1,13 +1,11 @@
<template>
<span v-bind:class="'icon fa fa-' + iname" aria-hidden="true"></span>
<span :class="'icon fa fa-' + iname" aria-hidden="true"></span>
</template>
<script>
export default {
name: 'icon',
props: {
iname: String,
}
props: ['iname'],
}
</script>

View file

@ -1,19 +1,16 @@
<template>
<div class="home">
<b-list-group>
<list-group-item
v-for="item in menu"
v-bind:key="item.id"
v-bind:uri="item.uri"
v-bind:icon="item.icon"
>{{ $t(item.translation) }}</list-group-item>
<b-list-group-item v-for="item in menu" :key="item.id" :to="item.uri">
<icon :iname="item.icon" class="fa-fw"/>
<h2>{{ $t(item.translation) }}</h2>
<icon iname="chevron-right" class="fa-fw fs-sm ml-auto"/>
</b-list-group-item>
</b-list-group>
</div>
</template>
<script>
import ListGroupItem from '@/components/ListGroupItem'
export default {
name: 'Home',
data: () => {
@ -30,8 +27,19 @@ export default {
]
}
},
components: {
ListGroupItem
}
}
</script>
<style lang="scss" scoped>
.list-group-item {
padding: 0.75rem 0;
display: flex;
align-items: center;
}
h2 {
font-size: 1.25rem;
font-weight: 400;
margin: 0;
}
</style>