Make page title a component
This commit is contained in:
parent
7471f0e7b4
commit
74d52f1003
|
@ -40,7 +40,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="max-w-6xl mx-auto px-4">
|
<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>
|
</div>
|
||||||
|
|
||||||
<router-view/>
|
<router-view/>
|
||||||
|
|
5
src/components/PageTitle.vue
Normal file
5
src/components/PageTitle.vue
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<template>
|
||||||
|
<h1 class="font-bold text-2xl text-gray-800">
|
||||||
|
<slot></slot>
|
||||||
|
</h1>
|
||||||
|
</template>
|
|
@ -4,6 +4,8 @@ import router from './router'
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
|
Vue.component('page-title', require('@/components/PageTitle').default)
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
router,
|
router,
|
||||||
render: h => h(App)
|
render: h => h(App)
|
||||||
|
|
Loading…
Reference in a new issue