add link to github to demo component

This commit is contained in:
Hans Pagel 2020-08-20 17:31:06 +02:00
parent 0a01068db2
commit f13212b362
2 changed files with 11 additions and 0 deletions

View File

@ -20,6 +20,9 @@
<prism :code="activeFile.content" :language="activeFile.highlight" :highlight="highlight" />
</div>
</div>
<div class="demo__link">
<a :href="githubUrl" target="_blank">Edit on GitHub</a>
</div>
</div>
</template>
@ -81,6 +84,10 @@ export default {
activeFile() {
return this.files[this.currentIndex]
},
githubUrl() {
return `https://github.com/ueberdosis/tiptap-next/tree/main/docs/src/demos/${this.name}`
},
},
mounted() {

View File

@ -48,4 +48,8 @@
border-radius: 0;
}
}
&__link {
padding: 1rem 1.5rem;
}
}