Skip to content

Commit

Permalink
[docs] hide example part if not available
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooya Parsa committed Apr 7, 2017
1 parent f76c538 commit 16fd317
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/nuxt/components/jsfiddle.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div>
<div v-if="slug && slug.length">
<iframe
width="100%"
:height="height"
Expand Down
6 changes: 4 additions & 2 deletions docs/nuxt/pages/docs/components/_component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
<div class="container">
<div v-html="readme"></div>

<h4 class="mt-4">Example</h4>
<jsfiddle :slug="`${meta.jsfiddle}`" tabs="result,html,js"></jsfiddle>
<template v-if="meta.jsfiddle && meta.jsfiddle.length">
<h4 class="mt-4">Example</h4>
<jsfiddle :slug="`${meta.jsfiddle}`" tabs="result,html,js"></jsfiddle>
</template>

<componentdoc :component="meta.component" :events="meta.events" :slots="meta.slots"></componentdoc>

Expand Down

0 comments on commit 16fd317

Please sign in to comment.