Make page title a component

This commit is contained in:
Oliver Davies 2019-04-24 00:52:57 +01:00
parent 7471f0e7b4
commit 74d52f1003
3 changed files with 8 additions and 1 deletions

View file

@ -40,7 +40,7 @@
</div>
<div class="max-w-6xl mx-auto px-4">
<h1 class="font-bold text-2xl text-gray-800">All Projects</h1>
<page-title>All Projects</page-title>
</div>
<router-view/>

View file

@ -0,0 +1,5 @@
<template>
<h1 class="font-bold text-2xl text-gray-800">
<slot></slot>
</h1>
</template>

View file

@ -4,6 +4,8 @@ import router from './router'
Vue.config.productionTip = false
Vue.component('page-title', require('@/components/PageTitle').default)
new Vue({
router,
render: h => h(App)