improve heading components

This commit is contained in:
Seth Ladygo
2019-05-17 14:29:09 -07:00
parent f7acf26867
commit b8e09b21c5
4 changed files with 36 additions and 15 deletions

View File

@ -8,7 +8,11 @@
<v-layout row fill-height> <v-layout row fill-height>
<v-flex xs4> <v-flex xs4>
<v-card> <v-card>
<DragListHeading title="Sections" /> <DragListHeading title="Sections">
<v-btn @click="showAddSectionDialog = true" icon class="ma-0 pa-0">
<v-icon>add</v-icon>
</v-btn>
</DragListHeading>
<div id="sections" class="list-group"> <div id="sections" class="list-group">
<div v-for="item in sections" :key="item.id"> <div v-for="item in sections" :key="item.id">

View File

@ -0,0 +1,17 @@
<template>
<v-card class="subheading font-weight-bold ma-0 pa-0 white--text" color="keen_dark_grey">
<v-card-title class="ma-0 pa-0 pl-1">
<span class="pa-2">{{ title }}</span>
<v-spacer></v-spacer>
<slot></slot>
</v-card-title>
</v-card>
</template>
<script>
export default {
props: {
title: String,
},
}
</script>

View File

@ -1,12 +1,9 @@
<template> <template>
<v-card class="subheading font-weight-bold ma-0 pl-2" color="grey lighten-2"> <v-card class="subheading font-weight-bold ma-0 pl-2" color="grey lighten-2">
<v-card-title class=""> <v-card-title class="ma-0 pa-0">
{{ title }} <span class="pa-2">{{ title }}</span>
<v-spacer></v-spacer> <v-spacer></v-spacer>
<!-- <v-btn icon> <slot></slot>
<v-icon class="ma-0 pa-0">add</v-icon>
</v-btn>
-->
</v-card-title> </v-card-title>
</v-card> </v-card>
</template> </template>

View File

@ -1,15 +1,13 @@
<template> <template>
<v-layout row justify-center> <v-layout row justify-center>
<v-dialog v-model="show" persistent max-width="280"> <v-dialog v-model="show" max-width="280">
<v-card> <v-card>
<v-card class="subheading font-weight-bold ma-0 pa-0 white--text" color="keen_dark_grey"> <DialogHeading title="Quit Editor">
<v-card-title class="ma-0 pa-2 pl-3"> <v-btn @click="show = false" icon class="ma-0 pa-0">
Quit Editor <v-icon color="white">clear</v-icon>
<v-spacer></v-spacer> </v-btn>
<v-icon color="white" @click="show = false">clear</v-icon> </DialogHeading>
</v-card-title>
</v-card>
<v-card-text> <v-card-text>
Abandon changes and return to the catalog list? Abandon changes and return to the catalog list?
@ -26,8 +24,13 @@
</template> </template>
<script> <script>
import DialogHeading from './DialogHeading'
// https://stackoverflow.com/questions/48035310/open-a-vuetify-dialog-from-a-component-template-in-vuejs // https://stackoverflow.com/questions/48035310/open-a-vuetify-dialog-from-a-component-template-in-vuejs
export default { export default {
components: {
DialogHeading,
},
data: () => ({ data: () => ({
}), }),
props: { props: {