11.4 Adding List Headers
This commit is contained in:
parent
76f839a587
commit
193c0bada6
21
src/components/Shared/ListHeader.vue
Normal file
21
src/components/Shared/ListHeader.vue
Normal file
@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<q-banner
|
||||
dense
|
||||
inline-actions
|
||||
class="list-header text-white bg-orange-4 text-center">
|
||||
<span class="text-bold text-subtitle1"><slot /></span>
|
||||
</q-banner>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ListHeader'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.list-header {
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
}
|
||||
</style>
|
@ -1,4 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<list-header>Completed</list-header>
|
||||
<q-list
|
||||
v-if="Object.keys(tasksCompleted).length"
|
||||
separator
|
||||
@ -10,17 +12,19 @@
|
||||
:task="task"
|
||||
:id="key"
|
||||
></task>
|
||||
|
||||
</q-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import task from 'components/Tasks/Task.vue'
|
||||
import listHeader from 'components/Shared/ListHeader.vue'
|
||||
|
||||
export default {
|
||||
name: 'TasksCompleted',
|
||||
components: {
|
||||
task
|
||||
task,
|
||||
listHeader
|
||||
},
|
||||
props: [
|
||||
'tasksCompleted'
|
||||
|
@ -1,4 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<list-header>Todo</list-header>
|
||||
<q-list
|
||||
v-if="Object.keys(tasksTodo).length"
|
||||
separator
|
||||
@ -12,15 +14,18 @@
|
||||
></task>
|
||||
|
||||
</q-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import task from 'components/Tasks/Task.vue'
|
||||
import listHeader from 'components/Shared/ListHeader.vue'
|
||||
|
||||
export default {
|
||||
name: 'TasksTodo',
|
||||
components: {
|
||||
task
|
||||
task,
|
||||
listHeader
|
||||
},
|
||||
props: [
|
||||
'tasksTodo'
|
||||
|
Loading…
Reference in New Issue
Block a user