mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-25 21:35:53 +08:00
show error message when demo is missing
This commit is contained in:
parent
4e2cfd1f49
commit
16da584ebd
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="demo">
|
||||
<div class="demo__preview" v-if="mainFile">
|
||||
<template v-if="mainFile">
|
||||
<div class="demo__preview">
|
||||
<component :is="mainFile" v-if="mode === 'vue'" />
|
||||
<react-renderer :component="mainFile" v-if="mode === 'react'" />
|
||||
</div>
|
||||
@ -23,6 +24,10 @@
|
||||
<div class="demo__link">
|
||||
<a :href="githubUrl" target="_blank">Edit on GitHub</a>
|
||||
</div>
|
||||
</template>
|
||||
<div v-else class="demo__error">
|
||||
Could not find a demo called “{{ this.name }}”.
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -52,4 +52,10 @@
|
||||
&__link {
|
||||
padding: 1rem 1.5rem;
|
||||
}
|
||||
|
||||
&__error {
|
||||
padding: 1rem 1.5rem;
|
||||
color: $colorRed;
|
||||
background-color: rgba($colorRed, 0.1);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user